Re: Help with queries...

Поиск
Список
Период
Сортировка
От Cristian Prieto
Тема Re: Help with queries...
Дата
Msg-id 063001c51ab2$67e726b0$6e00a8c0@gt.ClickDiario.local
обсуждение исходный текст
Ответ на Help with queries...  ("Cristian Prieto" <cristian@clickdiario.com>)
Ответы Re: Help with queries...  ("Joshua D. Drake" <jd@commandprompt.com>)
Re: Help with queries...  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
The book says:
There is a second kind of identifier: the delimited identifier or quoted
identifier. It is formed by enclosing an arbitrary sequence of characters in
double-quotes ("). A delimited identifier is always an identifier, never a
key word. So "select" could be used to refer to a column or table named
"select", whereas an unquoted select would be taken as a key word and would
therefore provoke a parse error when used where a table or column name is
expected. The example can be written with quoted identifiers like this:

UPDATE "my_table" SET "a" = 5;
Quoted identifiers can contain any character other than a double quote
itself. (To include a double quote, write two double quotes.) This allows
constructing table or column names that would otherwise not be possible,
such as ones containing spaces or ampersands. The length limitation still
applies.

But my table name Grupos is not a reserved keyword, so SELECT * FROM Grupos;
should work, right??? but guess what... It doesn't work too... I need to
pass SELECT * FROM "Grupos";



----- Original Message -----
From: "Michael Fuhr" <mike@fuhr.org>
To: "Cristian Prieto" <cristian@clickdiario.com>
Cc: <pgsql-general@postgresql.org>
Sent: Thursday, February 24, 2005 2:44 PM
Subject: Re: [GENERAL] Help with queries...


> On Thu, Feb 24, 2005 at 02:33:28PM -0600, Cristian Prieto wrote:
>
>> select * from users;
>> ERROR:  relation "users" does not exist
>>
>> but:
>> select * from "Users";
>> returns all the data I want...
>
> See "Identifiers and Keywords" in the "SQL Syntax" chapter of the
> documentation, especially the parts that talk about case and quoting:
>
> http://www.postgresql.org/docs/8.0/static/sql-syntax.html#SQL-SYNTAX-IDENTIFIERS
>
> --
> Michael Fuhr
> http://www.fuhr.org/~mfuhr/
>



В списке pgsql-general по дате отправления:

Предыдущее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: Help with queries...
Следующее
От: Charl Gerber
Дата:
Сообщение: Newbie: help with FUNCTION