Re: 9.5.2: "sql" as reserved word?

Поиск
Список
Период
Сортировка
От Kevin Grittner
Тема Re: 9.5.2: "sql" as reserved word?
Дата
Msg-id CACjxUsNCqtNM4PO4nwcxHN_Z=8iyb-_+cRbbX_jjDxEkfBo5LA@mail.gmail.com
обсуждение исходный текст
Ответ на 9.5.2: "sql" as reserved word?  (Marc Mamin <M.Mamin@intershop.de>)
Список pgsql-hackers
On Wed, May 4, 2016 at 8:58 AM, Marc Mamin <M.Mamin@intershop.de> wrote:

> select 'x' sql;
>
> ERROR:  syntax error at or near "sql"
> LINE 1: select 'x' sql;

It's likely that you already know this, but for the benefit of
anyone finding the thread who doesn't -- you can avoid this sort of
error by either inserting the optional AS keyword or quoting the
column label:

select 'x' as sql;

or:

select 'x' "sql";

--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



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

Предыдущее
От: Kevin Grittner
Дата:
Сообщение: Re: old_snapshot_threshold's interaction with hash index
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Is pg_control file crashsafe?