How to find all current sequence IDs - Mailing list pgsql-sql

From Campbell, Lance
Subject How to find all current sequence IDs
Date
Msg-id SJ0PR11MB562974ADFAF0F0CFB72A8B6DDE572@SJ0PR11MB5629.namprd11.prod.outlook.com
Whole thread Raw
Responses Re: How to find all current sequence IDs  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-sql

Is there a way to get a list of all sequences, the schema it is used in, and the current sequence number in use?

 

The below SQL will give me the schema and sequences. It does not give me the current sequence number in use.

 

SELECT sequence_schema, sequence_name

FROM information_schema.sequences

ORDER BY sequence_name ;

 

Thanks,

 

Lance Campbell

University of Illinois

pgsql-sql by date:

Previous
From: Tom Lane
Date:
Subject: Re: POSTGRES 15 - CONSTRAINT TRIGGER CREATION
Next
From: Tom Lane
Date:
Subject: Re: How to find all current sequence IDs