PostgreSQL Parse Error - Using LIKE ANY

Answered

I think I found an Postgres language construct that PhpStorm doesn't recognize. The query is this:

SELECT * from information_schema.tables WHERE table_name LIKE ANY(ARRAY['%_a_%', '%_b_%', '%_c_%'])

As can be seen - I'm basically saying "give me all the tables whose names are LIKE the specified wildcard strings. If I had actual table names, I'd do it using 

SELECT * from information_schema.tables WHERE table_name IN ('table1', 'table2', 'table3')

But you can't use wildcards in a straight up array search like that, so I'm forced to use the LIKE ANY construction.

As you can see from the below screenshot, PhpStorm doesn't like this. I can't figure out which inspection to disable, but either way, it should probably be a construct that PhpStorm recognizes, since it is valid SQL (in Postgres, at least)

Any ideas?

0
2 comments

Looks like a valid report, please feel free to submit to our tracker at http://youtrack.jetbrains.com/issues/DBE

0
Avatar
Permanently deleted user

Will do! Thanks for the response!

I assume fixes made to DG will fall through to the DB support in your other IDEs?

0

Please sign in to leave a comment.