Re: escaped rolenames in pg_has_role - Mailing list pgsql-general

From Tom Lane
Subject Re: escaped rolenames in pg_has_role
Date
Msg-id 28386.1182890812@sss.pgh.pa.us
Whole thread Raw
In response to Re: escaped rolenames in pg_has_role  ("Willy-Bas Loos" <willybas@gmail.com>)
Responses Re: escaped rolenames in pg_has_role  ("Willy-Bas Loos" <willybas@gmail.com>)
List pgsql-general
"Willy-Bas Loos" <willybas@gmail.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

pgsql-general by date:

Previous
From: Michael Glaesemann
Date:
Subject: Re: upgrade 8.1.4 -> latest, sort order subquery
Next
From: Tom Lane
Date:
Subject: Re: upgrade 8.1.4 -> latest, sort order subquery