From: | Scott Marlowe <smarlowe(at)g2switchworks(dot)com> |
---|---|
To: | Jon Horsman <horshaq(at)gmail(dot)com> |
Cc: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: How to query information schema from shell script |
Date: | 2006-10-27 19:14:26 |
Message-ID: | 1161976466.1655.1744.camel@state.g2switchworks.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
On Fri, 2006-10-27 at 10:12, Jon Horsman wrote:
> 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.
Oh, and read this:
http://www.gnu.org/software/bash/manual/bashref.html
It's a good starters manual for bash / shell programming.
For more advanced tutorials, look at:
www.deadman.org/bash.html
www.tldp.org/LDP/abc/html/index.html
From | Date | Subject | |
---|---|---|---|
Next Message | beau hargis | 2006-10-27 23:23:37 | Case Preservation disregarding case sensitivity? |
Previous Message | Richard Troy | 2006-10-27 18:00:37 | Re: [SQL] Can we convert from Postgres to Oracle !!??? |