Re: SECURITY LABEL on shared database object

From: Joe Conway <mail(at)joeconway(dot)com>
To: "Hackers (PostgreSQL)" <pgsql-hackers(at)postgresql(dot)org>, Kohei Kaigai <Kohei(dot)Kaigai(at)EMEA(dot)NEC(dot)COM>
Subject: Re: SECURITY LABEL on shared database object
Date: 2011-06-30 00:43:31
Message-ID: 4E0BC6B3.9080709@joeconway.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 06/29/2011 05:34 PM, Joe Conway wrote:
> The third key passed to SearchSysCache is CStringGetTextDatum(provider).
> Ultimately FunctionCall2Coll gets called with collation == 0 and
> varstr_cmp fails due to the ambiguity.
>
> Is there something new that should be used in place of
> CStringGetTextDatum that would convey a collation here?

(Sorry about replying to myself again...)

In fmgr.h we have:

8<-------------------------
/* These macros allow the collation argument to be omitted (with a
default of
* InvalidOid, ie, no collation). They exist mostly for backwards
* compatibility of source code.
*/
#define DirectFunctionCall1(func, arg1) \
DirectFunctionCall1Coll(func, InvalidOid, arg1)
#define DirectFunctionCall2(func, arg1, arg2) \
DirectFunctionCall2Coll(func, InvalidOid, arg1, arg2)
#define DirectFunctionCall3(func, arg1, arg2, arg3) \
DirectFunctionCall3Coll(func, InvalidOid, arg1, arg2, arg3)
[...]
8<--------------------------

Perhaps instead of InvalidOid here we should be using DEFAULT_COLLATION_OID?

Joe

--
Joe Conway
credativ LLC: http://www.credativ.us
Linux, PostgreSQL, and general Open Source
Training, Service, Consulting, & 24x7 Support

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message David Fetter 2011-06-30 00:53:36 Re: default privileges wording
Previous Message Robert Haas 2011-06-30 00:42:58 Re: default privileges wording