Re: BUG #18097: Immutable expression not allowed in generated at

From: Aleksander Alekseev <aleksander(at)timescale(dot)com>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, James Keener <jim(at)jimkeener(dot)com>
Subject: Re: BUG #18097: Immutable expression not allowed in generated at
Date: 2023-11-14 12:10:05
Message-ID: CAJ7c6TNNG_x8enNdhqmGdg_9A0fNa0LBadecBkuHc-=a7YqaFg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

Hi,

I noticed that the patchset needs a review and decided to take a look.

> There are a couple of points worth bikeshedding perhaps. I didn't
> spend much thought on the wrapper functions' names, but it's surely
> true that the semantic difference between contain_mutable_functions
> and ContainMutableFunctions is quite un-apparent from those names.
> Anybody got a better idea?

Oh no! We encountered one of the most difficult problems in computer
science [1].

ContainMutableFunctionsAfterPerformingPlannersTransformations() would
be somewhat long but semantically correct. It can be shortened to
ContainMutableFunctionsAfterTransformations() or perhaps
TransformedExprContainMutableFunctions(). Personally I don't mind long
names. This being said, ContainMutableFunctions() doesn't disgusts my
sense of beauty too much either. All in all any name will do IMO.
Naturally ContainVolatileFunctions() should be renamed consistently
with ContainMutableFunctions().

I couldn't find anything wrong with 0001..0003. The parches were
tested in several environments and passed `make check-world`. I
suggest merging them.

[1]: https://martinfowler.com/bliki/TwoHardThings.html

--
Best regards,
Aleksander Alekseev

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message PG Bug reporting form 2023-11-14 13:00:00 BUG #18195: PL/pgSQL: invalid syntax allowed in SELECT INTO statement
Previous Message Laurenz Albe 2023-11-14 04:18:59 Re: BUG #18179: Cluster History Error

Browse pgsql-hackers by date

  From Date Subject
Next Message Alexander Korotkov 2023-11-14 12:42:13 Re: Assert failure on 'list_member_ptr(rel->joininfo, restrictinfo)'
Previous Message Tomas Vondra 2023-11-14 12:01:13 Re: Why do indexes and sorts use the database collation?