pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: 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 11:12:49 -0400
Message-ID: <4f4c2a010610270812r65d321cejf00cb374596f2a5f@mail.gmail.com> (raw)
In-Reply-To: <4f4c2a010610270657we83aa70o471678507d59c6a0@mail.gmail.com>
References: <4f4c2a010610270631q73de201tb98446f64b942a0e@mail.gmail.com>
	<bc63ad820610270655h5bbc4fd4n797a7ea3d7e3bcdd@mail.gmail.com>
	<4f4c2a010610270657we83aa70o471678507d59c6a0@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.

Jon



view thread (11+ messages)  latest in thread

Message-ID: <4f4c2a010610270812r65d321cejf00cb374596f2a5f@mail.gmail.com>
Permalink:  ../4f4c2a010610270812r65d321cejf00cb374596f2a5f@mail.gmail.com/
Also on:    postgresql.org/message-id/4f4c2a010610270812r65d321cejf00cb374596f2a5f@mail.gmail.com

 · 

reply

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: horshaq@gmail.com
  Subject: Re: How to query information schema from shell script
  In-Reply-To: <4f4c2a010610270812r65d321cejf00cb374596f2a5f@mail.gmail.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