Re: 9.5 BLOCKER: regrole and regnamespace and quotes

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: 9.5 BLOCKER: regrole and regnamespace and quotes
Дата
Msg-id CAB7nPqTfMp7p9Pns4T-nLutL0GMULQ4VjS0LgLzY+ZAKzY2YXQ@mail.gmail.com
обсуждение исходный текст
Ответ на 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>)
Re: 9.5 BLOCKER: regrole and regnamespace and quotes  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Mon, Jan 4, 2016 at 1:46 PM, Jim Nasby <Jim.Nasby@bluetreble.com> wrote:
> On 1/3/16 10:26 PM, Michael Paquier wrote:
>>
>> Thanks, this is more or less what I... just did..
>
>
> Sorry, didn't realize you were on it.

No worries. I know it's already late where you are.

>> A couple of tests in regproc.sql would be a good addition as well.
>
> Added. I'm gonna call this good for now. Note this is just against HEAD
> since I don't have 9.5 setup yet. Presumably the patch should still apply...

+    if (list_length(names) > 1)
+        ereport(ERROR,
+                (errcode(ERRCODE_SYNTAX_ERROR),
+            errmsg("improper qualified name (too many dotted names): %s",
+                   NameListToString(names))));
I would use != 1 instead here, even if the function is strict.

You forgot to update the regression test output. And actually on
second thoughts the tests you added do not actually bring much value
because what is tested is just the behavior of
stringToQualifiedNameList, and the other reg* are not tested that as
well. However I think that we had better test the failures of
regnamespace and regrole when more than 1 element is parsed as this is
a new particular code path. Attached is an updated patch which passes
check-world in my environment.
--
Michael

Вложения

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

Предыдущее
От: Jim Nasby
Дата:
Сообщение: Re: 9.5 BLOCKER: regrole and regnamespace and quotes
Следующее
От: Jim Nasby
Дата:
Сообщение: Re: 9.5 BLOCKER: regrole and regnamespace and quotes