pganalyze / pg_query

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

[BUG] Type cast statement is deparsed incorrectly #310

Closed bogdan closed 9 months ago

bogdan commented 9 months ago

Code:

require 'pg_query'
PgQuery.parse('select 1::float').deparse

Expected value:

select 1::float

Actual value:

SELECT 1::double precision
bogdan commented 9 months ago

It seems like these are type aliases.