Re: Proposal: variant of regclass - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Proposal: variant of regclass
Date
Msg-id 30707.1386206753@sss.pgh.pa.us
Whole thread Raw
In response to Proposal: variant of regclass  (Tatsuo Ishii <ishii@sraoss.co.jp>)
Responses Re: Proposal: variant of regclass
Re: Proposal: variant of regclass
Re: Proposal: variant of regclass
List pgsql-hackers
Tatsuo Ishii <ishii@sraoss.co.jp> writes:
> I would like to add a variant of regclass, which is exactly same as
> current regclass except it does not raise an error when the target
> table is not found. Instead it returns InvalidOid (0).

I've sometimes thought we should just make all the reg* input converters
act that way.  It's not terribly consistent that they'll happily take
numeric inputs that don't correspond to any existing OID.  And more
often than not, I've found the throw-an-error behavior to be annoying
not helpful.

In any case, -1 for dealing with this only for regclass and not the
other ones.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: RFC: programmable file format for postgresql.conf
Next
From: Tom Lane
Date:
Subject: Re: Performance optimization of btree binary search