Re: QUAL Pushdown causes ERROR on syntactically and semantically correct SQL Query - Mailing list pgsql-hackers

From David G. Johnston
Subject Re: QUAL Pushdown causes ERROR on syntactically and semantically correct SQL Query
Date
Msg-id CAKFQuwZUh4Tn5aJerXuQjRn221xhTbgRqUF14Ng42FYaOrWu2Q@mail.gmail.com
Whole thread Raw
In response to QUAL Pushdown causes ERROR on syntactically and semantically correct SQL Query  (Hans Buschmann <buschmann@nidsa.net>)
List pgsql-hackers
On Mon, Jun 5, 2023, 07:40 Hans Buschmann <buschmann@nidsa.net> wrote:

I have reworked the case of BUG #17842 to include the data and the questions for further investigation.


The problem is NOT to correct the query to a working case, but to show a fundamental problem with qual pushdown.


The optimization system operates with imperfect information, meaning it assumes expressions do not produce errors depending on the data.  If you know certain data can produce errors you need to add the relevant code to avoid evaluating those expressions on those data.

Yes, or would nice if PostgreSQL could do better here.  The cost of doing so is quite high though, and there is no interest in incurring that cost.

David J.


pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Let's make PostgreSQL multi-threaded
Next
From: Tom Lane
Date:
Subject: Re: QUAL Pushdown causes ERROR on syntactically and semantically correct SQL Query