Received: from mta03-svc.ntlworld.com (mta03-svc.ntlworld.com [62.253.162.43]) by postgresql.org (8.11.3/8.11.4) with ESMTP id g12Gcol34209 for ; Sat, 2 Feb 2002 11:38:51 -0500 (EST) (envelope-from boylesa@roselink.co.uk) Received: from dualtower ([213.105.88.197]) by mta03-svc.ntlworld.com (InterMail vM.4.01.03.27 201-229-121-127-20010626) with SMTP id <20020202163845.ZMFB26285.mta03-svc.ntlworld.com@dualtower>; Sat, 2 Feb 2002 16:38:45 +0000 Message-ID: <005101c1ac08$02f3ea20$c55869d5@dualtower> From: "Steve Boyle \(Roselink\)" To: "D'laila Pereira" , References: Subject: Re: test the existence of a database Date: Sat, 2 Feb 2002 16:38:15 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 X-Archive-Number: 200202/35 X-Sequence-Number: 6467 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" To: 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@postgresql.org >