Re: [GENERAL] How to quote the COALESCE function?

2016-04-04 Thread Kevin Grittner
On Tue, Mar 29, 2016 at 12:38 PM, Pavel Stehule wrote: > The coalesce is one few functions implemented by special rule in > PostgreSQL parser. In the SQL standard the COALESCE feature is not listed as a function; it is listed as one of the short forms of CASE

Re: [GENERAL] How to quote the COALESCE function?

2016-03-29 Thread Pavel Stehule
Hi 2016-03-29 10:30 GMT+02:00 Roman Scherer : > Tom, Jerry, I'm going to do the same as the `quote_identifier` > function of Postgres does, only quote if necessary. > > Thanks for your explanation, Roman. > The coalesce is one few functions implemented by special rule in

Re: [GENERAL] How to quote the COALESCE function?

2016-03-29 Thread Roman Scherer
Tom, Jerry, I'm going to do the same as the `quote_identifier` function of Postgres does, only quote if necessary. Thanks for your explanation, Roman. On Tue, Mar 29, 2016 at 1:31 AM, Jerry Sievers wrote: > Roman Scherer writes: > > > Hello, >

Re: [GENERAL] How to quote the COALESCE function?

2016-03-28 Thread Jerry Sievers
Roman Scherer writes: > Hello, > > I'm building a DSL in Clojure for SQL and specifically PostgreSQL > [1]. When building a SQL statement that contains a function call > I always quote the function name with \" in case the function > name contains any special characters.

Re: [GENERAL] How to quote the COALESCE function?

2016-03-28 Thread Tom Lane
Roman Scherer 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.

[GENERAL] How to quote the COALESCE function?

2016-03-28 Thread Roman Scherer
Hello, I'm building a DSL in Clojure for SQL and specifically PostgreSQL [1]. When building a SQL statement that contains a function call I always quote the function name with \" in case the function name contains any special characters. Here's an example: (select db ['(upper "x")]) ;=>