List all sequences in a Postgres db 8.1 with SQL

I’m converting a db from postgres to mysql.

Since i cannot find a tool that does the trick itself, i’m going to convert all postgres sequences to autoincrement ids in mysql with autoincrement value.

So, how can i list all sequences in a Postgres DB (8.1 version) with information about the table in which it’s used, the next value etc with a SQL query?

Be aware that i can’t use the information_schema.sequences view in the 8.4 release.

20 Answers
20

Leave a Comment