pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Roberto Mello <rmello@cc.usu.edu>
To: Bhuvan A <bhuvansql@yahoo.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: checking for existence of a table in plpgsql.
Date: Thu, 14 Mar 2002 09:28:34 -0700
Message-ID: <20020314162834.GA22202@cc.usu.edu> (raw)
In-Reply-To: <Pine.LNX.4.20.0203141101100.32557-100000@Larry>
References: <Pine.LNX.4.20.0203141101100.32557-100000@Larry>

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



view thread (3+ messages)

Message-ID: <20020314162834.GA22202@cc.usu.edu>
Permalink:  ../20020314162834.GA22202@cc.usu.edu/
Also on:    postgresql.org/message-id/20020314162834.GA22202@cc.usu.edu

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: rmello@cc.usu.edu, bhuvansql@yahoo.com
  Subject: Re: checking for existence of a table in plpgsql.
  In-Reply-To: <20020314162834.GA22202@cc.usu.edu>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox