Received: from brasileiro.net (slxwy.dorms.usu.edu [129.123.236.160]) by postgresql.org (Postfix) with ESMTP id E0C0F476251 for ; Thu, 14 Mar 2002 11:27:56 -0500 (EST) Received: from roberto by brasileiro.net with local (Exim 3.35 #1 (Debian)) id 16lY5i-0005tH-00; Thu, 14 Mar 2002 09:28:34 -0700 Date: Thu, 14 Mar 2002 09:28:34 -0700 From: Roberto Mello To: Bhuvan A Cc: pgsql-sql@postgresql.org Subject: Re: checking for existence of a table in plpgsql. Message-ID: <20020314162834.GA22202@cc.usu.edu> References: Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.3.27i X-message-flag: Please consider using an e-mail program other than Outlook. It's insecure. X-Archive-Number: 200203/183 X-Sequence-Number: 7063 On Thu, Mar 14, 2002 at 11:10:35AM +0530, Bhuvan A wrote: > > hi, > > here i use postgresql 7.2. > > how can one know that a particular table exists or not in plpgsql? > > need is something like this.. > from plpgsql, i wish to insert a record in a table (create and insert, > if not exists). Besides what was already pointed out, I remember seeing some function to check for existance of several things in the Cookbook: http://www.brasileiro.net/postgres/cookbook/ -Roberto -- +----| http://fslc.usu.edu/ USU Free Software & GNU/Linux Club |------+ Roberto Mello - Computer Science, USU - http://www.brasileiro.net/ http://www.sdl.usu.edu/ - Space Dynamics Lab, Developer Once upon a time there was 3 little pigs, P1, P2 and P3