Re: 9.5 BLOCKER: regrole and regnamespace and quotes

From: Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com>
To: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: 9.5 BLOCKER: regrole and regnamespace and quotes
Date: 2016-01-04 04:46:37
Message-ID: 5689F92D.20903@BlueTreble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 Content-Type Size
patch.diff text/plain 4.1 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jim Nasby 2016-01-04 04:49:23 Re: count_nulls(VARIADIC "any")
Previous Message Michael Paquier 2016-01-04 04:37:33 Re: Additional role attributes && superuser review