Re: Get the sequence name corresponding to a GENERATED { ALWAYS | BY DEFAULT } AS IDENTITY column

From: Sebastien Flaesch <sebastien(dot)flaesch(at)4js(dot)com>
To: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>, "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Get the sequence name corresponding to a GENERATED { ALWAYS | BY DEFAULT } AS IDENTITY column
Date: 2023-02-08 13:00:21
Message-ID: DBAP191MB1289C9AE83CB97AFE54B9DC3B0D89@DBAP191MB1289.EURP191.PROD.OUTLOOK.COM
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Good point, thanks Peter!
Seb
________________________________
From: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>
Sent: Wednesday, February 8, 2023 12:07 PM
To: Sebastien Flaesch <sebastien(dot)flaesch(at)4js(dot)com>; pgsql-general(at)lists(dot)postgresql(dot)org <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Get the sequence name corresponding to a GENERATED { ALWAYS | BY DEFAULT } AS IDENTITY column

EXTERNAL: Do not click links or open attachments if you do not recognize the sender.

On 07.02.23 11:43, Sebastien Flaesch wrote:
> select '"'||ns.nspname||'"."'||p.relname||'"' tabname, c.attname colname

Just a side note: You might find the quote_ident() function useful.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message David G. Johnston 2023-02-08 13:25:25 Re: Index scan for PK constraint validation
Previous Message Philippe VIEGAS 2023-02-08 12:09:51 Index scan for PK constraint validation