Re: Single quotes vs. double quotes when setting a pwd and other cmds - Mailing list pgsql-general

From A. Kretschmer
Subject Re: Single quotes vs. double quotes when setting a pwd and other cmds
Date
Msg-id 20100623091603.GJ4289@a-kretschmer.de
Whole thread Raw
In response to Single quotes vs. double quotes when setting a pwd and other cmds  (Alexander Farber <alexander.farber@gmail.com>)
Responses Re: Single quotes vs. double quotes when setting a pwd and other cmds
List pgsql-general
In response to Alexander Farber :
> Hello,
>
> why aren't double quotes accepted below?
>
> db1=# alter user user1 password "pass1";
> ERROR:  syntax error at or near ""pass1""
> LINE 1: alter user user1 password "pass1";
>                                  ^
> db1=# alter user user1 password 'pass1';
> ALTER ROLE
>
> Is there a thumb rule to know when to use which quotes?
> I'm often confused by them when using psql.

Use ' for variable strings (values), and " for identifier (table-name,
column-name).


Andreas
--
Andreas Kretschmer
Kontakt:  Heynitz: 035242/47150,   D1: 0160/7141639 (mehr: -> Header)
GnuPG: 0x31720C99, 1006 CCB4 A326 1D42 6431  2EB0 389D 1DC2 3172 0C99

pgsql-general by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: Single quotes vs. double quotes when setting a pwd and other cmds
Next
From: Tom Wilcox
Date:
Subject: Re: libpython - cannot open shared object file