Re: Making CASE error handling less surprising - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Making CASE error handling less surprising
Date
Msg-id CA+TgmobFdDfY6-q-OEbsnDyCBmBzG3NeEv7z4PRR=EKmYfOK-Q@mail.gmail.com
Whole thread Raw
In response to Re: Making CASE error handling less surprising  (Chris Travers <chris.travers@adjust.com>)
List pgsql-hackers
On Sun, Jul 26, 2020 at 1:27 PM Chris Travers <chris.travers@adjust.com> wrote:
> The first (probably the best) would be a solution along the lines of yours along with a session-level GUC variable
whichcould determine whether case branches can fold constants.
 

Bluntly, that seems like a terrible idea. It's great if you are an
expert DBA, because then you can adjust the behavior on your own
system according to what works best for you. But if you are trying to
write portable code that will work on any PostgreSQL instance, you now
have to remember to test it with every possible value of the GUC and
make sure it behaves the same way under all of them. That is a major
burden on authors of tools and extensions, and if we add even three or
four such GUCs with three or four possible values each, there are
suddenly dozens or even hundreds of possible combinations to test. I
think that adding GUCs for this kind of thing is a complete
non-starter for that reason.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: INSERT INTO SELECT, Why Parallelism is not selected?
Next
From: Robert Haas
Date:
Subject: Re: Making CASE error handling less surprising