The current hedgehog tests are focused on the ability to roundtrip between printer & parser. This is a good test of both, but falls short of confirming that Postgres agrees that we're generating valid syntax. It would be good to have a family of tests that generate random ASTs and asks Postgres to confirm validity. (This direction seems easier than the reverse, or at least, involves writing Haskell, rather than collecting a test suite of widely representative SQL from other projects.)
The current
hedgehogtests are focused on the ability to roundtrip between printer & parser. This is a good test of both, but falls short of confirming that Postgres agrees that we're generating valid syntax. It would be good to have a family of tests that generate random ASTs and asks Postgres to confirm validity. (This direction seems easier than the reverse, or at least, involves writing Haskell, rather than collecting a test suite of widely representative SQL from other projects.)