sqlc icon indicating copy to clipboard operation
sqlc copied to clipboard

fix(compiler): prevent schema parse failures by ignoring psql meta commands

Open andrewmbenton opened this issue 3 months ago • 3 comments

This is kind of a lazy quick-and-dirty implementation that doesn't attempt to consolidate some duplicate line parsing that we do during migration removal and just sticks a func right in the package that handles file parsing for all engines, even though this line filter only applies to postgresql.

Happy to revise if there's a better place to put this.

Resolves https://github.com/sqlc-dev/sqlc/issues/4065

andrewmbenton avatar Aug 29 '25 15:08 andrewmbenton

Can this please be merged? It's a blocking issue with Postgres 17. @kyleconroy

atombender avatar Sep 16 '25 14:09 atombender

Bump. Can we get this merged?

j-houston avatar Oct 31 '25 17:10 j-houston

I added https://github.com/sqlc-dev/sqlc/pull/4177 to address @gbarr comment and not to break any other existing postgresql workflows (i.e., on /connect or other psql meta commands)

ignat980 avatar Nov 10 '25 20:11 ignat980