Kris Jurka wrote:
>
> 8.1 has changed the default text for serials from something like
> nextval('public.tab_col_seq'::text) to nextval('tab_col_seq'::regclass)
Applied with editing (didn't check for schema).
> + // Technically this serial check can still fail for sequences that
> + // get created with non-default names. Consider:
> + // CREATE SEQUENCE st_a_seq;
> + // CREATE TABLE st (a serial);
> + // Now the default's sequence is actually st_a_seq1.
This can't be created consistently using the CREATE TABLE foo (bar
serial) syntax, instead the column default syntax would need to be used.
I've put this on the TODO list, we'd need some discussion what reverse
engineering we really should show in such cases. This also has to
correspond with our column dialog, which will add pg_depend
automatically if adding a serial to an existing table (thus mimicking
the CREATE TABLE ... SERIAL stuff).
Regards,
Andreas