Re: test the existence of a database

From: "Steve Boyle \(Roselink\)" <boylesa(at)roselink(dot)co(dot)uk>
To: "D'laila Pereira" <dpereira(at)students(dot)uiuc(dot)edu>, <pgsql-sql(at)postgresql(dot)org>
Subject: Re: test the existence of a database
Date: 2002-02-02 16:38:15
Message-ID: 005101c1ac08$02f3ea20$c55869d5@dualtower
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

D'laila,

you could write a function in plpgsql that queried the postgres catalogues
for the object that you were interested in an returned true of false if the
object existed.

For an example see:

http://www.brasileiro.net/postgres/cookbook/view-one-recipe.adp?recipe_id=14
23

hih

steve boyle
----- Original Message -----
From: "D'laila Pereira" <dpereira(at)students(dot)uiuc(dot)edu>
To: <pgsql-sql(at)postgresql(dot)org>
Sent: Thursday, January 31, 2002 8:52 PM
Subject: [SQL] test the existence of a database

>
> After a database is created in postgresql using the createdb command,
> and populate it with some taqbles, how do we test the existence of the
> database and the tables within it?
>
> thanks
> d'laila
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org
>

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Stephan Szabo 2002-02-02 18:58:54 Re: casting question
Previous Message A. Van Hook 2002-02-02 15:20:38 casting question