From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
Cc: | Noah Misch <noah(at)leadboat(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Kohei KaiGai <kaigai(at)kaigai(dot)gr(dot)jp>, PgHacker <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: [v9.2] DROP Reworks Part.0 - 'missing_ok' support of get_object_address |
Date: | 2011-06-27 17:28:30 |
Message-ID: | BANLkTini=P1V-MbcWoUGZjpVWngAHmohRA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Jun 22, 2011 at 1:36 PM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> On Wed, Jun 22, 2011 at 12:51 PM, Alvaro Herrera
> <alvherre(at)commandprompt(dot)com> wrote:
>> Excerpts from Robert Haas's message of mié jun 22 08:56:02 -0400 2011:
>>
>>> Another option might be to leave heap_openrv() and relation_openrv()
>>> alone and add a missing_ok argument to try_heap_openrv() and
>>> try_relation_openrv(). Passing true would give the same behavior as
>>> presently; passing false would make them behave like the non-try
>>> version.
>>
>> That would be pretty weird, having two functions, one of them sometimes
>> doing the same thing as the other one.
>>
>> I understand Noah's concern but I think your original proposal was saner
>> than both options presented so far.
>
> I agree with you. If we had a whole pile of options it might be worth
> having heap_openrv() and heap_openrv_extended() so as not to
> complicate the simple case, but since there's no forseeable need to
> add anything other than missing_ok, my gut is to just add it and call
> it good.
On further review, my gut is having second thoughts. This patch is an
awful lot smaller and easier to verify correctness if I just mess with
the "try" calls and not the regular ones; and it avoids both
back-patching hazards for us and hoops for third-party loadable
modules that are using the non-try versions of those functions to jump
through.
Third try attached...
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Attachment | Content-Type | Size |
---|---|---|
there-is-no-try-v3.patch | application/octet-stream | 4.1 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2011-06-27 17:39:16 | Re: pg_upgrade defaulting to port 25432 |
Previous Message | Jeff Davis | 2011-06-27 17:00:09 | Re: Range Types, constructors, and the type system |