Re: determining existence of database and language

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Chris Sano <csano32(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: determining existence of database and language
Date: 2008-09-01 13:43:42
Message-ID: 48BBF18E.5060103@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Chris Sano wrote:
> I'm trying to build a SQL script that will create a database if it
> doesn't already exist. I've looked everywhere and haven't been able to
> find anything. Am I missing something? Thanks.

SELECT * FROM pg_database will tell you what databases exist.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Peter Eisentraut 2008-09-01 13:49:40 Re: ERROR: relation . . . does not exist
Previous Message Peter Eisentraut 2008-09-01 13:42:29 Re: SQL optimization - WHERE SomeField STARTING WITH ...