From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | Shigeru Hanada <shigeru(dot)hanada(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, 花田 茂 <hanada(at)metrosystems(dot)co(dot)jp>, Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Bug in SQL/MED? |
Date: | 2011-07-05 19:01:36 |
Message-ID: | 22695.1309892496@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
I wrote:
> I think it might be better to keep the convention that an empty options
> list is represented by null, and to say that if a validator wants to be
> called on such a list, it had better declare itself non-strict. At
> least we ought to think about that before redefining the catalog
> semantics at this late hour.
Another possibility that just occurred to me is to call the validator
like this:
if (OidIsValid(fdwvalidator))
{
Datum valarg = result;
/* pass a null options list as an empty array */
if (DatumGetPointer(valarg) == NULL)
valarg = construct_empty_array(TEXTOID);
OidFunctionCall2(fdwvalidator, valarg, ObjectIdGetDatum(catalogId));
}
This would avoid messing with the semantics of empty options lists
throughout foreigncmds.c, and also avoid requiring validators to deal
with null arguments.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2011-07-05 19:17:48 | Re: SSI atomic commit |
Previous Message | Kevin Grittner | 2011-07-05 18:35:37 | Re: SSI atomic commit |