Checkif sequence exists
Posted: Tue Jan 20, 2009 7:50 pm
I need to check if a sequence exists, I know that to check if a table exists you can rin a querry line
SELECT count(*)>0 FROM pg_tables WHERE schemaname='public' AND tablename='sections'
and it will return true if the table exists and false if it doesnt. But how do you check this for a sequence? I couldnt fint much online about this.
Thanks
Raman
SELECT count(*)>0 FROM pg_tables WHERE schemaname='public' AND tablename='sections'
and it will return true if the table exists and false if it doesnt. But how do you check this for a sequence? I couldnt fint much online about this.
Thanks
Raman