Re: escaped rolenames in pg_has_role

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Willy-Bas Loos" <willybas(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: escaped rolenames in pg_has_role
Date: 2007-06-26 20:46:52
Message-ID: 28386.1182890812@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Willy-Bas Loos" <willybas(at)gmail(dot)com> writes:
>> A quote in the data might be real data or quoting, and you have no way to
>> tell the difference.

> It's not so bad, because a parameter of type name cannot start with a quote.

Sure it can.

regression=# select '"Fooey"'::name;
name
---------
"Fooey"
(1 row)

regression=# create table foo ( """Fooey""" int);
CREATE TABLE
regression=# \d foo
Table "public.foo"
Column | Type | Modifiers
---------+---------+-----------
"Fooey" | integer |

regression=#

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2007-06-26 21:00:25 Re: upgrade 8.1.4 -> latest, sort order subquery
Previous Message Michael Glaesemann 2007-06-26 20:23:33 Re: upgrade 8.1.4 -> latest, sort order subquery