Re: detecting serials in 8.1

Поиск
Список
Период
Сортировка
От Andreas Pflug
Тема Re: detecting serials in 8.1
Дата
Msg-id 43F8CE98.8040509@pse-consulting.de
обсуждение исходный текст
Ответ на detecting serials in 8.1  (Kris Jurka <books@ejurka.com>)
Ответы Re: detecting serials in 8.1  (Kris Jurka <books@ejurka.com>)
Список pgadmin-hackers
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


В списке pgadmin-hackers по дате отправления:

Предыдущее
От: Andreas Pflug
Дата:
Сообщение: Re: SVN Commit by dpage: r5003 - in trunk/pgadmin3:
Следующее
От: svn@pgadmin.org
Дата:
Сообщение: SVN Commit by andreas: r5009 - trunk/pgadmin3/src/schema