public inbox for [email protected]help / color / mirror / Atom feed
Lower/upper-case consistency with function names 3+ messages / 2 participants [nested] [flat]
* Lower/upper-case consistency with function names @ 2022-06-05 08:20 Shay Rojansky <[email protected]> 2022-06-05 08:27 ` Re: Lower/upper-case consistency with function names Julien Rouhaud <[email protected]> 0 siblings, 1 reply; 3+ messages in thread From: Shay Rojansky @ 2022-06-05 08:20 UTC (permalink / raw) To: pgsql-docs Hi all, The PostgreSQL docs mostly show function names in lowercase (e.g. [1], [2]), which seems to be the PostgreSQL-idiomatic thing to do. However, some pages show functions in upper case, e.g. COALESCE/NULLIF/GREATEST/LEAST ([3]). Is there some difference between these which warrants the case difference, or just a case of docs inconsistency? I ran into this while trying to make Entity Framework (.NET ORM) generate more idiomatic-looking SQL. If this is just an inconsistency, it's obviously not very important. Thanks, Shay [1] https://www.postgresql.org/docs/current/functions-aggregate.html [2] https://www.postgresql.org/docs/current/datatype-datetime.html [3] https://www.postgresql.org/docs/current/functions-conditional.html ^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Lower/upper-case consistency with function names 2022-06-05 08:20 Lower/upper-case consistency with function names Shay Rojansky <[email protected]> @ 2022-06-05 08:27 ` Julien Rouhaud <[email protected]> 2022-06-05 08:59 ` Re: Lower/upper-case consistency with function names Shay Rojansky <[email protected]> 0 siblings, 1 reply; 3+ messages in thread From: Julien Rouhaud @ 2022-06-05 08:27 UTC (permalink / raw) To: Shay Rojansky <[email protected]>; +Cc: pgsql-docs Hi, On Sun, Jun 05, 2022 at 10:20:23AM +0200, Shay Rojansky wrote: > > The PostgreSQL docs mostly show function names in lowercase (e.g. [1], > [2]), which seems to be the PostgreSQL-idiomatic thing to do. However, some > pages show functions in upper case, e.g. COALESCE/NULLIF/GREATEST/LEAST > ([3]). Is there some difference between these which warrants the case > difference, or just a case of docs inconsistency? > > I ran into this while trying to make Entity Framework (.NET ORM) generate > more idiomatic-looking SQL. If this is just an inconsistency, it's > obviously not very important. As mentioned in the doc in [3], COALESCE and all the others are actually not functions (those are specific keywords handled in the parser): > Although COALESCE, GREATEST, and LEAST are syntactically similar to > functions, they are not ordinary functions, and thus cannot be used with > explicit VARIADIC array arguments. As the rest of the keywords, they're case insensitive but our convention is to document them in uppercase. > [3] https://www.postgresql.org/docs/current/functions-conditional.html ^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Lower/upper-case consistency with function names 2022-06-05 08:20 Lower/upper-case consistency with function names Shay Rojansky <[email protected]> 2022-06-05 08:27 ` Re: Lower/upper-case consistency with function names Julien Rouhaud <[email protected]> @ 2022-06-05 08:59 ` Shay Rojansky <[email protected]> 0 siblings, 0 replies; 3+ messages in thread From: Shay Rojansky @ 2022-06-05 08:59 UTC (permalink / raw) To: Julien Rouhaud <[email protected]>; +Cc: pgsql-docs On Sun, Jun 5, 2022 at 10:27 AM Julien Rouhaud <[email protected]> wrote: > As mentioned in the doc in [3], COALESCE and all the others are actually not functions (those are specific keywords handled in the parser): Thanks. Yeah, I noticed that comment, but NULLIF which is also documented on that page isn't mentioned in that comment, but it's still shown in upper-case. It's maybe worth adding NULLIF to that comment. I'm also not sure I'd consider real/not real distinction as something that's very relevant to the user, to the extent that it warrants a case difference... But that doesn't matter much. ^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2022-06-05 08:59 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2022-06-05 08:20 Lower/upper-case consistency with function names Shay Rojansky <[email protected]> 2022-06-05 08:27 ` Julien Rouhaud <[email protected]> 2022-06-05 08:59 ` Shay Rojansky <[email protected]>
This inbox is served by agora; see mirroring instructions for how to clone and mirror all data and code used for this inbox