r/ProgrammerHumor • • Oct 14 '25

Advanced neverForget

/img/fmfo1e41g0vf1.png
14k Upvotes

616 comments sorted by

View all comments

Show parent comment

2

u/Exepony Oct 14 '25

psql definitely requires it, at least by default. A bit inconvenient, but since you're usually using it for manual one-off tasks, I'll gladly trade a bit of convenience for the additional ass-coverage.

1

u/3inthecorner Oct 14 '25

The postgres cli psql requires semicolon by default but there's an option to send the query on newline instead. You can also use \g to send the query without the semicolon. The postgres protocol doesn't require a semicolon but does allow it to separate statements within a single command. The extended query protocol only allows one statement but it can end in a semicolon

-1

u/titpetric Oct 14 '25

Not in php; the client is one statement per query I believe. Your experience may vary