Re: How to query information schema from shell script

From: "Jon Horsman" <horshaq(at)gmail(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: How to query information schema from shell script
Date: 2006-10-27 15:12:49
Message-ID: 4f4c2a010610270812r65d321cejf00cb374596f2a5f@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Jon Horsman 2006-10-27 15:22:25 Re: How to query information schema from shell script
Previous Message vamsee movva 2006-10-27 14:34:21 not able to execute query on spatial database.