From: | Pavel Golub <pavel(at)microolap(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Tatsuo Ishii <ishii(at)sraoss(dot)co(dot)jp>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Proposal: variant of regclass |
Date: | 2013-12-05 06:57:41 |
Message-ID: | 9210263748.20131205085741@gf.microolap.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hello, Tom.
You wrote:
TL> Tatsuo Ishii <ishii(at)sraoss(dot)co(dot)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).
TL> I've sometimes thought we should just make all the reg* input converters
TL> act that way.
Absolutely agree. I cannot see the case whn error is the appropriate
solution. Casting nonexistent objects to NULL is the way to go for me.
TL> It's not terribly consistent that they'll happily take
TL> numeric inputs that don't correspond to any existing OID. And more
TL> often than not, I've found the throw-an-error behavior to be annoying
TL> not helpful.
TL> In any case, -1 for dealing with this only for regclass and not the
TL> other ones.
TL> regards, tom lane
--
With best wishes,
Pavel mailto:pavel(at)gf(dot)microolap(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | Kyotaro HORIGUCHI | 2013-12-05 08:12:18 | Re: Get more from indices. |
Previous Message | Dean Rasheed | 2013-12-05 06:22:59 | Re: Re: [BUGS] BUG #7873: pg_restore --clean tries to drop tables that don't exist |