Re: Single quotes vs. double quotes when setting a pwd and other cmds

Поиск
Список
Период
Сортировка
От A. Kretschmer
Тема Re: Single quotes vs. double quotes when setting a pwd and other cmds
Дата
Msg-id 20100623091603.GJ4289@a-kretschmer.de
обсуждение исходный текст
Ответ на Single quotes vs. double quotes when setting a pwd and other cmds  (Alexander Farber <alexander.farber@gmail.com>)
Ответы Re: Single quotes vs. double quotes when setting a pwd and other cmds  (Alexander Farber <alexander.farber@gmail.com>)
Список 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 по дате отправления:

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: Single quotes vs. double quotes when setting a pwd and other cmds
Следующее
От: Tom Wilcox
Дата:
Сообщение: Re: libpython - cannot open shared object file