Interesting Bits of Postgres Grammar
10 months ago
- #SQL
- #PostgreSQL
- #Database
- Postgres allows custom operators, which can be prefix or infix but not postfix.
- Custom operators enable unique syntax like lambda expressions in array_filter.
- Compound SELECT statements apply ORDER BY to the entire result set.
- CREATE FUNCTION can use column types via %TYPE syntax.
- Adjacent string literals merge unless separated by a comment.
- Quoted identifiers support escaping double quotes and Unicode via U&.
- Operators can be called as functions, including schema specification.