Re: How to quote the COALESCE function?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: How to quote the COALESCE function?
Дата
Msg-id 25882.1459207856@sss.pgh.pa.us
обсуждение исходный текст
Ответ на How to quote the COALESCE function?  (Roman Scherer <roman@burningswell.com>)
Список pgsql-general
Roman Scherer <roman@burningswell.com> writes:
> Can someone explain to me what's the difference between quoting
> the `upper` and the `coalesce` function?

COALESCE is a keyword.

> What I found so far is, that the `upper` function can be found in
> the `pg_proc` table but not `coalesce`.

Yup.

> Does this mean that `coalesce` isn't a classical function and I
> shouldn't quote it? Is it instead a keyword, as described in
> the "Lexical Structure" section of the docs [2]? How can I find
> out which other functions are not meant to be quoted?

Yes, yes, and you already found one good way: if it doesn't have
a pg_proc entry then it's a special case of some sort or other.

Have you considered only quoting the function name if it actually
needs it, ie, contains special characters?

            regards, tom lane


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

Предыдущее
От: John Turner
Дата:
Сообщение: Re: Unique values on multiple tables
Следующее
От: Jerry Sievers
Дата:
Сообщение: Re: How to quote the COALESCE function?