Re: escaped rolenames in pg_has_role

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

er.. i guess i was misinformed. (by Korry & Susan Douglas´ second edition,
maybe this is relatively new?)
However, could you please answer my question?

On 6/26/07, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> "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

Browse pgsql-general by date

  From Date Subject
Next Message PFC 2007-06-26 21:42:39 Re: Ordering in SELECT statement
Previous Message Martin Langhoff 2007-06-26 21:28:24 Re: LC_CTYPE and matching accented chars