Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WARNING: unsupported expression for extractClauseFrom #30

Open
johnmudd opened this issue Oct 18, 2013 · 8 comments
Open

WARNING: unsupported expression for extractClauseFrom #30

johnmudd opened this issue Oct 18, 2013 · 8 comments

Comments

@johnmudd
Copy link

I was wondering how more complex WHERE clauses would be handled. I see they're not. That's understandable.

What's the best way to suppress the WARNING and DETAIL messages for this specific situation? Is there a way to log the original SQL statement rather than the DETAIL message?

Can you tell me more about what is and is not supported?

Thanks,
John

$ echo 'select * from shipping WHERE residential = 1 or delivery = 1;' | psql rx30_db
WARNING:  unsupported expression for extractClauseFrom
DETAIL:  {BOOLEXPR :boolop or :args ({OPEXPR :opno 532 :opfuncid 158 :opresulttype 16 :opretset false :opcollid 0 :inputcollid 0 :args ({VAR :varno 1 :varattno 19 :vartype 21 :vartypmod -1 :varcollid 0 :varlevelsup 0 :varnoold 1 :varoattno 19 :location 29} {CONST :consttype 23 :consttypmod -1 :constcollid 0 :constlen 4 :constbyval true :constisnull false :location 43 :constvalue 4 [ 1 0 0 0 ]}) :location 41} {OPEXPR :opno 532 :opfuncid 158 :opresulttype 16 :opretset false :opcollid 0 :inputcollid 0 :args ({VAR :varno 1 :varattno 6 :vartype 21 :vartypmod -1 :varcollid 0 :varlevelsup 0 :varnoold 1 :varoattno 6 :location 48} {CONST :consttype 23 :consttypmod -1 :constcollid 0 :constlen 4 :constbyval true :constisnull false :location 59 :constvalue 4 [ 1 0 0 0 ]}) :location 57}) :location -1}
WARNING:  unsupported expression for extractClauseFrom
DETAIL:  {BOOLEXPR :boolop or :args ({OPEXPR :opno 532 :opfuncid 158 :opresulttype 16 :opretset false :opcollid 0 :inputcollid 0 :args ({VAR :varno 1 :varattno 19 :vartype 21 :vartypmod -1 :varcollid 0 :varlevelsup 0 :varnoold 1 :varoattno 19 :location 29} {CONST :consttype 23 :consttypmod -1 :constcollid 0 :constlen 4 :constbyval true :constisnull false :location 43 :constvalue 4 [ 1 0 0 0 ]}) :location 41} {OPEXPR :opno 532 :opfuncid 158 :opresulttype 16 :opretset false :opcollid 0 :inputcollid 0 :args ({VAR :varno 1 :varattno 6 :vartype 21 :vartypmod -1 :varcollid 0 :varlevelsup 0 :varnoold 1 :varoattno 6 :location 48} {CONST :consttype 23 :consttypmod -1 :constcollid 0 :constlen 4 :constbyval true :constisnull false :location 59 :constvalue 4 [ 1 0 0 0 ]}) :location 57}) :location -1}
 ctdel | reference | pat_storeid | pat_key | packaged | delivery | lastupdate | name | add1 | add2 | city | state | zip | phone | email_present | email | iteminfo | weight | residential | yes | no | spare
-------+-----------+-------------+---------+----------+----------+------------+------+------+------+------+-------+-----+-------+---------------+-------+----------+--------+-------------+-----+----+-------
(0 rows)

$ 
@rdunklau
Copy link
Contributor

What is supported: simple OpExpr of the form column OPERATOR value.

If you want to suppress the warning messages, you could issue a SET client_min_messages = ERROR during your PostgreSQL session, but it would suppress any log at lower levels.

There is no way to get the original statement right now, and you're right that it should. Leaving this open at the moment.

@txntxn
Copy link

txntxn commented Aug 8, 2014

This appears related to #76

@komamitsu
Copy link

@rdunklau Why does Multicorn show the warning message when using OR operator despite the query seems to be able to handle OR operator properly?

postgres=# select * from csvtest where year = 2000 or make = 'Ford';
WARNING:  unsupported expression for extractClauseFrom
DETAIL:  {BOOLEXPR :boolop or :args ({OPEXPR :opno 1752 :opfuncid 1718 :opresulttype 16 :opretset false :opcollid 0 :inputcollid 0 :args ({VAR :varno 1 :varattno 1 :vartype 1700 :vartypmod -1 :varcollid 0 :varlevelsup 0 :varnoold 1 :varoattno 1 :location 28} {CONST :consttype 1700 :consttypmod -1 :constcollid 0 :constlen -1 :constbyval false :constisnull false :location -1 :constvalue 8 [ 32 0 0 0 0 -128 -48 7 ]}) :location 33} {OPEXPR :opno 98 :opfuncid 67 :opresulttype 16 :opretset false :opcollid 0 :inputcollid 100 :args ({RELABELTYPE :arg {VAR :varno 1 :varattno 2 :vartype 1043 :vartypmod -1 :varcollid 100 :varlevelsup 0 :varnoold 1 :varoattno 2 :location 43} :resulttype 25 :resulttypmod -1 :resultcollid 100 :relabelformat 2 :location -1} {CONST :consttype 25 :consttypmod -1 :constcollid 100 :constlen -1 :constbyval false :constisnull false :location 50 :constvalue 8 [ 32 0 0 0 70 111 114 100 ]}) :location 48}) :location -1}
WARNING:  unsupported expression for extractClauseFrom
DETAIL:  {BOOLEXPR :boolop or :args ({OPEXPR :opno 1752 :opfuncid 1718 :opresulttype 16 :opretset false :opcollid 0 :inputcollid 0 :args ({VAR :varno 1 :varattno 1 :vartype 1700 :vartypmod -1 :varcollid 0 :varlevelsup 0 :varnoold 1 :varoattno 1 :location 28} {CONST :consttype 1700 :consttypmod -1 :constcollid 0 :constlen -1 :constbyval false :constisnull false :location -1 :constvalue 8 [ 32 0 0 0 0 -128 -48 7 ]}) :location 33} {OPEXPR :opno 98 :opfuncid 67 :opresulttype 16 :opretset false :opcollid 0 :inputcollid 100 :args ({RELABELTYPE :arg {VAR :varno 1 :varattno 2 :vartype 1043 :vartypmod -1 :varcollid 100 :varlevelsup 0 :varnoold 1 :varoattno 2 :location 43} :resulttype 25 :resulttypmod -1 :resultcollid 100 :relabelformat 2 :location -1} {CONST :consttype 25 :consttypmod -1 :constcollid 100 :constlen -1 :constbyval false :constisnull false :location 50 :constvalue 8 [ 32 0 0 0 70 111 114 100 ]}) :location 48}) :location -1}
 year |  make   | model  | length 
------+---------+--------+--------
 1997 | Ford    | E350   |   2.34
 2000 | Mercury | Cougar |   2.38
(2 rows)

@jmealo
Copy link

jmealo commented Jun 13, 2016

Can we get an update on this? From what I understand, FDW should implement the full API or we can expect weird/broken behavior (especially with complicated queries). Newer versions of PostgreSQL are able to push down a growing number of operations to FDW.

It may be safest to use a view or CTE to isolate a simple query against an FDW and then do anything complicated somewhere that PostgreSQL won't try to push it down to the FDW.

@erichanson
Copy link

erichanson commented Jan 6, 2018

I'm also running into this. The query seems to be working but throwing a very scary warning.

WARNING: unsupported expression for extractClauseFrom
...

@Jlesse
Copy link

Jlesse commented Mar 6, 2018

Still seeing this issue as well.

@erichanson
Copy link

Anything new on this issue? I don't want to turn off warnings, but this warning is filling logs with junk.

@leonmvd
Copy link

leonmvd commented Nov 1, 2019

Issue is still there indeed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants