I have created a sequence (let's call it my_seq) in a schema (let's call it my_schema) of my PostgreSQL (version 13) database. I am sure the sequence exists because I can find it in the result set of the query
select n.nspname as sequence_schema,
c.relname as sequence_name
from pg_class c
join pg_namespace n on n.oid = c.relnamespace
where c.relkind = 'S'
and n.nspname = 'my_schema'
However, if I run the following query
select sequence_name
from information_schema.sequences
where sequence_schema = 'my_schema'
my_seq isn't in the result set. I have run both queries with the same user I created the sequence with.
Can anybody help me find an explanation for this?