Subject: | sequence lookup fails on db with added dependancies |
The sequence initialisation sql fails in a 8.0.1 database migrated using the 'adddepend' script to fix SERIAL dependancies.
The sequence lookup uses this sql (line 103):
--
SELECT adsrc FROM ${catalog}pg_attrdef
WHERE
adrelid=(SELECT oid FROM ${catalog}pg_class WHERE relname=?)
--
Patching the statement to the below fixes the problem:
--
SELECT adsrc FROM ${catalog}pg_attrdef
WHERE
adrelid=(SELECT oid FROM ${catalog}pg_class WHERE relname=?)
and adsrc ilike 'nextval%'
--