Checking for existence of table

From: Paul McGarry <paulm(at)opentec(dot)com(dot)au>
To: pgsql-sql(at)hub(dot)org
Subject: Checking for existence of table
Date: 2000-07-11 07:28:33
Message-ID: 396ACCA1.8E354519@opentec.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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(at)opentec(dot)com(dot)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

Browse pgsql-sql by date

  From Date Subject
Next Message Volker Paul 2000-07-11 07:31:49 Change type of column
Previous Message Adam Walczykiewicz 2000-07-11 07:16:19 SQL-92 SQLSTATE in PostgreSQL ?!