Re: Detecting autoincrement columns

Поиск
Список
Период
Сортировка
От Melvin Davidson
Тема Re: Detecting autoincrement columns
Дата
Msg-id CANu8Fix__Z6v3iuWBLuOw1eWTSPLw5kBZ78HM0wp80Ep_FkZLQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Detecting autoincrement columns  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Detecting autoincrement columns
Список pgsql-general
Try this:

SELECT *
    FROM information_schema.columns
WHERE UPPER(column_default) LIKE 'NEXTVAL%'
ORDER BY 1, 2, 3;

On Tue, Sep 1, 2015 at 6:33 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
"FarjadFarid\(ChkNet\)" <farjad.farid@checknetworks.com> writes:
> Can someone please direct me as how to detect columns (serial) with
> autoincrement option ?

They have a default that depends on a nextval() call.

                        regards, tom lane


--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



--
Melvin Davidson
I reserve the right to fantasize.  Whether or not you
wish to share my fantasy is entirely up to you.

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Detecting autoincrement columns
Следующее
От: Andy Colson
Дата:
Сообщение: Re: 9.5 beta pg_upgrade documentation