Re: Username with a hyphen character (grant failing?) - Mailing list pgsql-general

From will trillich
Subject Re: Username with a hyphen character (grant failing?)
Date
Msg-id 20010602042207.B28201@serensoft.com
Whole thread Raw
In response to Re: Username with a hyphen character (grant failing?)  (Doug McNaught <doug@wireboard.com>)
List pgsql-general
On Fri, May 25, 2001 at 11:38:50AM -0400, Doug McNaught wrote:
> Sean Chittenden <sean-pgsql-general@chittenden.org> writes:
>
> > > >     What's the scoop with username constraints?  I setup and
> > > > created a user with a '-' character in the middle (worked).
> > >
> > > Double quotes are your friend when dealing with names that don't
> > > follow the usual constraints for identifiers.
> >
> >     Are single quotes treated differently than double?  I tried
> > single, but didn't have any luck...  -sc
>
> Yes.  Single quotes are for strings; double quotes are for
> identifiers.

meaning, for example:

    create table info (
        "this field" text,
        "that-field" integer,
        "it's alarming" serial
    );
    insert into info("this-field")values('here\'s the contents for that column in the table');

or

    grant select on "table named with spaces" to "some-oddball-user";

    select 'this is a string value, not a field or table name';

--
#95: We are waking up and linking to each other. We are watching. But
we are not waiting.  -- www.cluetrain.com

will@serensoft.com
http://sourceforge.net/projects/newbiedoc -- we need your brain!
http://www.dontUthink.com/ -- your brain needs us!

pgsql-general by date:

Previous
From: will trillich
Date:
Subject: Re: pl-perl setup?
Next
From: will trillich
Date:
Subject: Re: having problems with a simple query