Re: 9.5 BLOCKER: regrole and regnamespace and quotes

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: 9.5 BLOCKER: regrole and regnamespace and quotes
Дата
Msg-id 29618.1451882238@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: 9.5 BLOCKER: regrole and regnamespace and quotes  (Jim Nasby <Jim.Nasby@BlueTreble.com>)
Ответы Re: 9.5 BLOCKER: regrole and regnamespace and quotes  (Jim Nasby <Jim.Nasby@BlueTreble.com>)
Список pgsql-hackers
Jim Nasby <Jim.Nasby@bluetreble.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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Jim Nasby
Дата:
Сообщение: Re: 9.5 BLOCKER: regrole and regnamespace and quotes
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: Additional role attributes && superuser review