pganalyze / pg_query_go

Go library to parse and normalize SQL queries using the PostgreSQL query parser
BSD 3-Clause "New" or "Revised" License
663 stars 79 forks source link

Upgrade PostgreSQL to version 12 #26

Closed kyleconroy closed 3 years ago

kyleconroy commented 4 years ago

I'm using pg_query_go to power the PostgreSQL support in https://github.com/kyleconroy/sqlc. Someone ran into an issue where their CREATE TRIGGER statement was failing to parse because they used new syntax introduced in PostgreSQL 11.

Are there plans to upgrade the parser to the current version of PostgreSQL?

kyleconroy commented 4 years ago

Looks like a second user ran into the same problem, this time using generated columns, which were added in PostgreSQL 12.

kyleconroy commented 4 years ago

A third user has run into this problem, this time due to PARTITION BY HASH.

kyleconroy commented 4 years ago

See work on the upstream parser here: https://github.com/lfittl/libpg_query/pull/67

lfittl commented 3 years ago

This has been resolved, with pg_query 2.0 being released today (based on the Postgres 13 parser) - thanks for your patience on this @kyleconroy!