Re: regclass without error? - Mailing list pgsql-hackers

From Pavel Golub
Subject Re: regclass without error?
Date
Msg-id 1493540644.20100903173019@gf.microolap.com
Whole thread Raw
In response to regclass without error?  (Tatsuo Ishii <ishii@postgresql.org>)
List pgsql-hackers
Hello, guys.

You wrote:

TI> Hi,

TI> Is there any way to use regclass without having ERROR?

TI> pgpool-II needs to find the oid from table name and for the purpose it
TI> issues something like "SELECT 'table_name'::regproc::oid". Problem is,
TI> if the table does not exist, an error occured and the transaction
TI> aborts. Ideally if the table does not exist, the SELECT returns 0
TI> (InvalidOid).

Agreed with Tatsuo about having InvalidOid.

TI> Any idea?
TI> --
TI> Tatsuo Ishii
TI> SRA OSS, Inc. Japan
TI> English: http://www.sraoss.co.jp/index_en.php
TI> Japanese: http://www.sraoss.co.jp




-- 
With best wishes,Pavel                          mailto:pavel@gf.microolap.com



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: regclass without error?
Next
From: Tom Lane
Date:
Subject: Re: plan time of MASSIVE partitioning ...