From: | Melvin Davidson <melvin6925(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | "FarjadFarid(ChkNet)" <farjad(dot)farid(at)checknetworks(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Detecting autoincrement columns |
Date: | 2015-09-01 23:19:52 |
Message-ID: | CANu8Fix__Z6v3iuWBLuOw1eWTSPLw5kBZ78HM0wp80Ep_FkZLQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> "FarjadFarid\(ChkNet\)" <farjad(dot)farid(at)checknetworks(dot)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(at)postgresql(dot)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.
From | Date | Subject | |
---|---|---|---|
Next Message | Andy Colson | 2015-09-01 23:56:11 | Re: 9.5 beta pg_upgrade documentation |
Previous Message | Tom Lane | 2015-09-01 22:33:13 | Re: Detecting autoincrement columns |