From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)com> |
Cc: | Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: 9.5 BLOCKER: regrole and regnamespace and quotes |
Date: | 2016-01-04 04:37:18 |
Message-ID: | 29618.1451882238@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)com> writes:
> On 1/3/16 9:23 PM, Tom Lane wrote:
>> (Though at least in HEAD we ought to
>> fix them to take type text as input. Using cstring for ordinary functions
>> is just sloppy.)
> BTW, *all* the reg*in() functions do that...
Yeah, I noticed that. They're all broken. There are no other built-in
functions that take cstring except for datatype input functions and
encoding conversion functions, which are required to by their respective
meta-APIs, and which are not meant to be invoked directly from SQL.
These functions had no business being the first to think that cstring is
a full fledged type; which it is not. Notably, that means this doesn't
work:
regression=# select to_regrole('foo'::text);
ERROR: function to_regrole(text) does not exist
and most other cases where you'd computed an input value rather than
merely typed in a literal would fail likewise.
It's not a release stopper, but I plan to fix it in HEAD whenever I have
an idle hour.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2016-01-04 04:37:33 | Re: Additional role attributes && superuser review |
Previous Message | Jim Nasby | 2016-01-04 04:27:53 | Re: 9.5 BLOCKER: regrole and regnamespace and quotes |