On Fri, Aug 2, 2013 at 6:21 PM, Jean MAURICE
<mauricejea@numericable.fr> wrote:
Hi everybody,
I have some more questions :
Is there a SQL command to
- test if a database exists
postgres=# select * from pg_database where datname='<DB name>';
or
postgres=# \l
- test if a table exists
postgres=# select * from pg_class where rename='<tablename>';
- get the list of the tables of a database
postgres=# \dt
or
postgres=# select * from pg_class
- get the structure (list of fields) of a table
postgres=# \d <tablename>
Thanks & Regards
Raghu Ram