Skip to main content

Check syntax of sql for PostgreSQL

Project description

PgSanity checks the syntax of Postgresql SQL files.

It does this by leveraging the ecpg command which is traditionally used for preparing C files with embedded sql for compilation. However, as part of that preparation, ecpg checks the embedded SQL statements for syntax errors using the exact same parser that is in PostgreSQL.

So the approach that PgSanity takes is to take a file that has a list of bare SQL in it, make that file look like a C file with embedded SQL, run it through ecpg and let ecpg report on the syntax errors of the SQL.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pgsanity-0.2.9.tar.gz (7.5 kB view details)

Uploaded Source

File details

Details for the file pgsanity-0.2.9.tar.gz.

File metadata

  • Download URL: pgsanity-0.2.9.tar.gz
  • Upload date:
  • Size: 7.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pgsanity-0.2.9.tar.gz
Algorithm Hash digest
SHA256 de0bbd6fe4f98bf5139cb5f466eac2e2abaf5a7b050b9e4867b87bf360873173
MD5 6ac9b910b867c1a40e003f0939cfda88
BLAKE2b-256 4570d9ce2d8a93a7b755b09871125768c3237f99147472ec6f3ca3237cd22a4d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page