You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
SQLC fails for psql meta-commands like \restrict #4065
This should be high priority. sqlc is no longer able to parse any output from pg_dump because they are now adding this new \restrict meta-command to all dump outputs.
Reacted by Dessalines, Grae Abbott, Otto Virag, Jonathan Witchard, Alexander Staubo, Ignat Remizov, Claudiu Nedelcu, Guillaume Desforges, Artemy Vakhrushev and Alexandru Tache
james-johnston-thumbtack commented on Aug 15, 2025
Release notes that discuss it: https://www.postgresql.org/docs/release/17.6/ (see "Prevent pg_dump scripts from being used to attack the user running the restore (Nathan Bossart)")
They have cherry-picked this onto all PostgreSQL versions going back as far as at least PostgreSQL 13 due to the fact it's a security issue.
This is critical, as its breaking many CI setups out of the blue.
Reacted by James Johnston, Niklas Mack, Simon Sölder, YueXi Mo, Grae Abbott, Danny Kopping, Captain, Nicholas Carnival, Jonathan Witchard, Alexander Staubo and 5 more
Activity
james-johnston-thumbtack commentedon Aug 15, 2025
This should be high priority.
sqlcis no longer able to parse any output frompg_dumpbecause they are now adding this new\restrictmeta-command to all dump outputs.james-johnston-thumbtack commentedon Aug 15, 2025
Here is the upstream commit that introduced this new behavior: https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=575f54d4c
Release notes that discuss it: https://www.postgresql.org/docs/release/17.6/ (see "Prevent pg_dump scripts from being used to attack the user running the restore (Nathan Bossart)")
They have cherry-picked this onto all PostgreSQL versions going back as far as at least PostgreSQL 13 due to the fact it's a security issue.
dessalines commentedon Aug 18, 2025
This is critical, as its breaking many CI setups out of the blue.
jrmullins commentedon Aug 21, 2025
Perhaps not the prettiest solution but I got around before sqlc generate wtih this one liner
andrewmbenton commentedon Aug 29, 2025
Taking a look at this now. Should be easy enough to ignore lines like this.
fix(compiler): prevent schema parse failures by ignoring psql meta co…
workaround for sqlc-dev/sqlc#4065
ignatremizov commentedon Nov 10, 2025
Added #4177 which builds on top of #4082
fix(compiler): prevent schema parse failures by ignoring psql meta co…
fix(compiler): prevent schema parse failures by ignoring psql meta co…
Strip psql meta-commands from schema files (fixes #4065)
Strip psql meta-commands from schema files (fixes sqlc-dev#4065) (sql…
Merge upstream v1.31.1
Merge upstream v1.31.1
Merge upstream v1.31.1