From: Richard Broersma Jr <rabroersma@yahoo.com>
To: Jon Horsman <horshaq@gmail.com>
To: pgsql-sql@postgresql.org
Subject: Re: How to query information schema from shell script
Date: Fri, 27 Oct 2006 21:09:35 -0700 (PDT)
Message-ID: <840218.2181.qm@web31804.mail.mud.yahoo.com> (raw)
In-Reply-To: <4f4c2a010610270812r65d321cejf00cb374596f2a5f@mail.gmail.com>
> In my original email i forgot to mentioned i need to know if the
> database exists or not from the shell script. If it doesn't exist i
> would then create it. Currently i was just creating the db everytime
> our db script is run (since it doesn't hurt the db) but this generates
> the 'db already exists' log and I now have the requirement that the
> users not see that log. ie, don't run createdb if it already exists.
>
> In looking through the postgres docs i can see how to check if a table
> exists but not how a db exists.
>
> Again, thanks for the help.
psql -l
Regards,
Richard Broersma Jr.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: rabroersma@yahoo.com, horshaq@gmail.com
Subject: Re: How to query information schema from shell script
In-Reply-To: <840218.2181.qm@web31804.mail.mud.yahoo.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox