You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey @lfittl, thanks again for this awesome project.
Someone reported a query to me that throws an error with the tables method. Here's the simplest version that reproduces it.
PgQuery.parse("SELECT * FROM pg_catalog.pg_class c JOIN (SELECT 17650 AS oid UNION ALL SELECT 17663 AS oid) vals ON c.oid = vals.oid").tables
Backtrace
NoMethodError: undefined method `map' for nil:NilClass
from /Users/andrew/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/pg_query-0.13.2/lib/pg_query/parse.rb:208:in `block in load_tables_and_aliases!'
from /Users/andrew/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/pg_query-0.13.2/lib/pg_query/parse.rb:186:in `loop'
from /Users/andrew/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/pg_query-0.13.2/lib/pg_query/parse.rb:186:in `load_tables_and_aliases!'
from /Users/andrew/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/pg_query-0.13.2/lib/pg_query/parse.rb:59:in `tables_with_types'
from /Users/andrew/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/pg_query-0.13.2/lib/pg_query/parse.rb:33:in `tables'
from (irb):14
from /Users/andrew/.rbenv/versions/2.4.1/bin/irb:11:in `<main>'
The text was updated successfully, but these errors were encountered:
Hey @lfittl, thanks again for this awesome project.
Someone reported a query to me that throws an error with the
tables
method. Here's the simplest version that reproduces it.Backtrace
The text was updated successfully, but these errors were encountered: