В письме от понедельник, 24 марта 2025 г. 17:48:25 MSK пользователь Robert Haas написал: > On Mon, Mar 24, 2025 at 10:43 AM Nathan Bossart > > <nathandboss...@gmail.com> wrote: > > Overall, the biggest reason I didn't proceed with the enum is because it > > felt like it was making it the user's problem. Rather than just teaching > > our code how to determine if a reloption was explicitly set, we'd be > > introducing unnecessary complexity to the user, or at least we'd be trying > > to closely match the existing functionality in an attempt to hide this > > complexity from them. > > +1. Giving the user the ability to set the option to a value called > "unset" doesn't seem right to me.
1. Enum allows you to make default value "unreachable" for setting. But this is not the most important thing. 2. This option has three possible values: on/off/system_default. We can find better name for system_default, but it would not change it's meaning. I would prefer to let user set these three values explicitly. Nobody would guess that ALTER TABLE test SET (vacuum_truncate=false); means "off" and ALTER TABLE test RESET (vacuum_truncate); means "system_default" This will lead to a lot of confusion. So I strongly against this implying third value for boolean. This is nasty thing. Boolean should have two values. -- Nikolay Shaplov aka Nataraj Fuzzing Engineer at Postgres Professional Matrix IM: @dhyan:nataraj.su
signature.asc
Description: This is a digitally signed message part.