I have created sequence in postgres.
postgres=# create sequence my_sequence start 5 minvalue 3 increment 1 cycle;
CREATE SEQUENCE
Now I am trying to query the next value from the sequence.
postgres=# select nextval("my_sequence");
ERROR: column "my_sequence" does not exist
LINE 1: select nextval("my_sequence");
But it's giving me error, that sequence doesn't exists. But, when I use single quote with the sequence_name, then it works fine :-
postgres=# select nextval('my_sequence');
nextval
---------
5
(1 row)
But as per difference between single quote and double quote in sql, double quotes can be used with any user defined sql object. so, accordingly my_sequence is also user-defined object. So, why I am not able to access it ?