From: | "George Pavlov" <gpavlov(at)mynewplace(dot)com> |
---|---|
To: | "Jon Horsman" <horshaq(at)gmail(dot)com>, <pgsql-sql(at)postgresql(dot)org> |
Subject: | Re: How to query information schema from shell script |
Date: | 2006-10-27 15:43:06 |
Message-ID: | 8C5B026B51B6854CBE88121DBF097A8655C599@ehost010-33.exch010.intermedia.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
simplest might be psql -l.
> -----Original Message-----
> From: pgsql-sql-owner(at)postgresql(dot)org
> [mailto:pgsql-sql-owner(at)postgresql(dot)org] On Behalf Of Jon Horsman
> Sent: Friday, October 27, 2006 8:13 AM
> To: pgsql-sql(at)postgresql(dot)org
> Subject: Re: [SQL] How to query information schema from shell script
>
> 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
From | Date | Subject | |
---|---|---|---|
Next Message | Doug Hyde | 2006-10-27 16:28:53 | Function to reset sequence..... |
Previous Message | Aaron Bono | 2006-10-27 15:25:10 | Re: not able to execute query on spatial database. |