Source code to accompany my October 30, 2026 article
(
LinkedIn |
blog
)
about stricter types in databases (SQL domain and PostgreSQL operators)
SQL formatting conventions
- Examples:
select:from,group by,order by - 1 item per line; indent 1 extra space for comma
- Conspicuous leading comma prevents syntax errors when items are added
- Examples:
select:where,having - No extra indentation unless and until logical operators (
not,or,and) are added - Then, use line breaks, indentation, and parentheses so that the expression can be read naturally and parallel parts of the expression can easily be recognized
-
Always align or space out pairs based on longer item
= > asc true != >= desc false
| Scope | Link | Included Copy |
|---|---|---|
| Source code, and source code in documentation | GNU General Public License (GPL) 3.0 | LICENSE-CODE.md |
| Documentation, including this ReadMe file | GNU Free Documentation License (FDL) 1.3 | LICENSE-DOC.md |
Copyright Paul Marcelin
Contact: marcelin at cmu.edu (replace "at" with @)