Received: from mail.opentec.com.au ([203.5.51.3]) by hub.org (8.10.1/8.10.1) with ESMTP id e6B7IRW84050 for ; Tue, 11 Jul 2000 03:18:28 -0400 (EDT) Received: from opentec.com.au (ochre) by mail.opentec.com.au (Sun Internet Mail Server sims.3.5.1999.07.30.00.05.p8) with ESMTP id <0FXI00L02V7DG2@mail.opentec.com.au> for pgsql-sql@hub.org; Tue, 11 Jul 2000 17:23:37 +1000 (EST) Date: Tue, 11 Jul 2000 17:28:33 +1000 From: Paul McGarry Subject: Checking for existence of table To: pgsql-sql@hub.org Message-id: <396ACCA1.8E354519@opentec.com.au> MIME-version: 1.0 X-Mailer: Mozilla 4.61 [en] (Win98; I) Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7bit X-Accept-Language: en X-Archive-Number: 200007/117 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