Answers for "psql check if sql script is valid"

SQL
0

psql check if sql script is valid

$ pgsanity good1.sql good2.sql bad.sql
bad.sql: line 1: ERROR: syntax error at or near "bogus_token"

$ find -name '*.sql' | xargs pgsanity
./sql/bad1.sql: line 59: ERROR: syntax error at or near ";"
./sql/bad2.sql: line 41: ERROR: syntax error at or near "insert"
./sql/bad3.sql: line 57: ERROR: syntax error at or near "update"
Posted by: Guest on May-06-2021

Code answers related to "SQL"

Browse Popular Code Answers by Language