Re: Porting from MySql - meta data issues - Mailing list pgsql-general

From Antti Haapala
Subject Re: Porting from MySql - meta data issues
Date
Msg-id Pine.LNX.4.44.0204052245501.20299-100000@calvin
Whole thread Raw
In response to Porting from MySql - meta data issues  (Geoff Caplan <geoff@advantae.com>)
List pgsql-general
> I have a number of PHP functions in the app which return meta-info about
> the data structure:
>
> list_databases( ) ;
> list_tables( $database_name ) ;
> list_field_names( $table_name ) ;
> is_existing_field( $table_name ) ;
>
> With MySql, this info is readily available using the various SHOW queries,
> but I can't figure out how to do this with Postgres.

Run psql with -E switch and you're able to see internal queries generated
by i.e. \dt and \l commands. Then you can cut'n'paste and modify those
queries to match your requirements.

--
Antti Haapala


pgsql-general by date:

Previous
From: Doug McNaught
Date:
Subject: Re: binary data storage
Next
From: Geoff Caplan
Date:
Subject: Re: Porting from MySql - meta data issues