Search Postgresql Archives

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello!

Assuming that a sequence is used to implement GENERATED { ALWAYS | BY DEFAULT } AS IDENTITY

Is there any built-in function that returns the underlying sequence name used for such column?

Otherwise, an SQL query to return the sequence name?

I need the sequence name, in order to reset it (setval) or to get the last generated value (currval) ...

The query must work with all PostgreSQL versions 10 to 15 ...

Seb

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux