in reply to DBI - MySQL vs. PgSQL

Postgres stores all its table names in a table, pg_tables.

To get a list of all non system tables using SQL try:

select * from pg_tables where tablename not like 'pg_%' 

Ta ta

Replies are listed 'Best First'.
Re: Re: DBI - MySQL vs. PgSQL
by quikwit (Beadle) on Jan 18, 2002 at 19:01 UTC

    > To get a list of all non system tables using SQL try:

    > select * from pg_tables where tablename not like 'pg_%' <CODE>

    Which is fine until you switch to another database in the future, at which time you have to modify the script again.

    In general, I choose to try to always use non-vendor specific solutions. Come to think of it, that's why DBI exists in the first place!

    rick