Subject: Mathematical Functions and Operators

From: Marcos Pegoraro <[email-masked]>
Date: Wed, 9 Oct 2024 16:16:53 -0300

Exponentiation, Square root and Cube root operators are not formatted with
<replaceable> tag like others.

https://www.postgresql.org/docs/current/functions-math.html

regards
Marcos

---

From: Marcos Pegoraro <[email-masked]>
Date: Wed, 9 Oct 2024 18:20:22 -0300

> <replaceable> tag like others.

Paying more attention, there is no standard on any of those Comparison,
String, Math, Date/Time and so on functions and operators tables. What
format should it be ?
Only datatypes should use <replaceable> ?
Shouldn't function names use <replaceable> too ?

regards
marcos

---

From: "David G. Johnston" <[email-masked]>
Date: Wed, 9 Oct 2024 14:23:54 -0700

> Shouldn't function names use <replaceable> too ?

Replaceable means the user is expected to substitute an expression in that
location.  One cannot specify a function name using an expression.

David J.

---

From: Marcos Pegoraro <[email-masked]>
Date: Wed, 9 Oct 2024 18:41:37 -0300

> location.  One cannot specify a function name using an expression.

Sorry, I thought function parameters but said names. So, function params
should have <replaceable> too ?
If you see JSON functions there are functions that their params have
<replaceable> tag

json_array ( [ *query_expression* ] [ RETURNING *data_type* [ FORMAT
JSON [ ENCODING
UTF8 ] ] ])
json_scalar ( *expression* )
json_serialize ( *expression* [ FORMAT JSON [ ENCODING UTF8 ] ] [ RETURNING
*data_type* [ FORMAT JSON [ ENCODING UTF8 ] ] ] )

they are fine, but a lot of others don't

to_json ( anyelement ) → json
json_object ( text[] ) → json

regars
Marcos