Answer the question
In order to leave comments, you need to log in
How to get the increment of the created sequence?
Created an example sequence
create sequence public.example minvalue 2000 start 2000 increment 1000;
Answer the question
In order to leave comments, you need to log in
information_schema.sequences is the correct answer, only the schema name should also be taken into account so as not to accidentally get several lines from different schemas.
In postgresql 10+, you can access the system directory like this
Before release 10, look at
(not at hand to specify the field name)
But if postgresql implementation details are not needed, then information_schema.sequences will probably be more appropriate. unlikely to change in major releases.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question