pganalyze / pg_query

Ruby extension to parse, deparse and normalize SQL queries using the PostgreSQL query parser
BSD 3-Clause "New" or "Revised" License
778 stars 84 forks source link

Parse: Fix `ALTER INDEX my_index_name` to return `tables = []` #285

Closed ayufan closed 1 year ago

ayufan commented 1 year ago

When parsing ALTER INDEX index_name SET (fast_update = true); the pg_query wrongly classifies index_name as a table name.

Expected output for above is tables = [].

This fix is targeted to only ignore OBJECT_INDEX to avoid breaking all other patterns.

References:

ayufan commented 1 year ago

@lfittl If possible could we push a new release? Of course: I can help out with that :)

lfittl commented 1 year ago

@ayufan 4.2.1 is now released!