pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Paul McGarry <paulm@opentec.com.au>
To: pgsql-sql@hub.org
Subject: Checking for existence of table
Date: Tue, 11 Jul 2000 17:28:33 +1000
Message-ID: <396ACCA1.8E354519@opentec.com.au> (raw)

Hello,

Is it possible to check for the existence of a table within PL/pgSQL?

Would 
select count(*) from pg_class where relname='name' and 
reltype='0'
be the answer to this question?

-- 
Paul McGarry            mailto:paulm@opentec.com.au 
Systems Integrator      http://www.opentec.com.au 
Opentec Pty Ltd         http://www.iebusiness.com.au
6 Lyon Park Road        Phone: (02) 9878 1744 
North Ryde NSW 2113     Fax:   (02) 9878 1755



Message-ID: <396ACCA1.8E354519@opentec.com.au>
Permalink:  ../396ACCA1.8E354519@opentec.com.au/
Also on:    postgresql.org/message-id/396ACCA1.8E354519@opentec.com.au

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: paulm@opentec.com.au, pgsql-sql@hub.org
  Subject: Re: Checking for existence of table
  In-Reply-To: <396ACCA1.8E354519@opentec.com.au>
  References: <396ACCA1.8E354519@opentec.com.au>

* 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