Re: 9.5 BLOCKER: regrole and regnamespace and quotes - Mailing list pgsql-hackers

From Jim Nasby
Subject Re: 9.5 BLOCKER: regrole and regnamespace and quotes
Date
Msg-id 5689F92D.20903@BlueTreble.com
Whole thread Raw
In response to Re: 9.5 BLOCKER: regrole and regnamespace and quotes  (Michael Paquier <michael.paquier@gmail.com>)
Responses 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>)
Re: 9.5 BLOCKER: regrole and regnamespace and quotes  (Michael Paquier <michael.paquier@gmail.com>)
List pgsql-hackers
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.

> +    result = get_namespace_oid(nsp_name, false);
> This is incorrect, you should use strVal(linitial(names)) instead.

Yup. Dur.

> +    if (list_length(names) > 1)
> +        ereport(ERROR,
> +                (errcode(ERRCODE_SYNTAX_ERROR),
> +            errmsg("improper qualified name (too many dotted names): %s",
> +                   NameListToString(names))));
> I would just mark that as "Invalid syntax".

Just noticed this... I just copied the same syntax used elsewhere...
whoever commits feel free to editorialize...

> 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...
--
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com

Attachment

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Additional role attributes && superuser review
Next
From: Jim Nasby
Date:
Subject: Re: count_nulls(VARIADIC "any")