Skip site navigation (1) Skip section navigation (2)

Re: regclass without error?

From: Pavel Golub <pavel(at)microolap(dot)com>
To: Tatsuo Ishii <ishii(at)postgresql(dot)org>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: regclass without error?
Date: 2010-09-03 14:30:19
Message-ID: (view raw or whole thread)
Lists: 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:
TI> Japanese:

With best wishes,
 Pavel                          mailto:pavel(at)gf(dot)microolap(dot)com

In response to

pgsql-hackers by date

Next:From: Tom LaneDate: 2010-09-03 14:31:29
Subject: Re: regclass without error?
Previous:From: David FetterDate: 2010-09-03 14:21:00
Subject: Re: regclass without error?

Privacy Policy | About PostgreSQL
Copyright © 1996-2015 The PostgreSQL Global Development Group