databases list to file

From: Joao Ferreira gmail <joao(dot)miguel(dot)c(dot)ferreira(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: databases list to file
Date: 2008-10-09 14:13:58
Message-ID: 1223561638.6634.26.camel@jmf-ubuntu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello all,

I need to print to a file a simple list of all the databases on my
postgresql.

I need to do this from a shell script to be executed without human
intervention

I guess something like:

su postgres -c 'psql ...whatever.... > /tmp/my_databases.txt'

but I don't know exactly to what extent I can format the output of this
in order to simplify the parser that will read that file.

any suggestions ?

thank you

joao

Responses

Browse pgsql-general by date

  From Date Subject
Next Message A. Kretschmer 2008-10-09 14:20:24 Re: databases list to file
Previous Message Tony Marston 2008-10-09 14:01:01 GROUP BY does not follow SQL standard