Re: Rethinking parameterized SQL queries
Florian Weimer 27 Feb 2021 12:32 UTC
* John Cowan:
> 1) The ? character has no meaning in any known SQL dialect other than
> parameterization: it can otherwise appear only in strings, which are
> delimited by required apostrophes, and symbolic names (databases, tables,
> columns, etc.), which are delimited by double quotes if needed or desired.
> See <https://crate.io/docs/sql-99/en/latest/index.html> for a fully
> detailed but readable presentation of SQL-99.
This is not entirely correct. PostgreSQL uses ? in operator names.
There is even a predefined ? operator for JSON types:
fw=> SELECT '{"a":true}'::jsonb ? 'a';
?column?
----------
t
(1 row)