psql check if sql script is valid

Solutions on MaxInterview for psql check if sql script is valid by the best coders in the world

showing results for - "psql check if sql script is valid"
Lise
15 Jun 2020
1$ pgsanity good1.sql good2.sql bad.sql
2bad.sql: line 1: ERROR: syntax error at or near "bogus_token"
3
4$ find -name '*.sql' | xargs pgsanity
5./sql/bad1.sql: line 59: ERROR: syntax error at or near ";"
6./sql/bad2.sql: line 41: ERROR: syntax error at or near "insert"
7./sql/bad3.sql: line 57: ERROR: syntax error at or near "update"
8