Re: [PATCH] ALTER TABLE ... SET STORAGE default - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [PATCH] ALTER TABLE ... SET STORAGE default
Date
Msg-id 2623256.1667670359@sss.pgh.pa.us
Whole thread Raw
In response to Re: [PATCH] ALTER TABLE ... SET STORAGE default  (Aleksander Alekseev <aleksander@timescale.com>)
Responses Re: [PATCH] ALTER TABLE ... SET STORAGE default
List pgsql-hackers
Aleksander Alekseev <aleksander@timescale.com> writes:
> Hi Nikita,
>> This seems a little bit confusing and thus very unfriendly for the user, because the actual meaning
>> of the same 'DEFAULT' option will be different for each data type, and to check storage mode user
>> has to query full table (or column) description.
>> I'd rather add a paragraph in documentation describing each data type default storage mode.

> I agree that "SET STORAGE default" syntax leaves much to be desired.

FWIW, I don't buy that argument at all.  If you believe that then
you must also think that

    INSERT INTO mytab VALUES (..., DEFAULT, ...);

is a poorly-designed feature because you have to go consult the table
definition to find out what will be inserted.  (Well, maybe you do
think that, but the SQL committee won't agree with you ;-))  So I don't
see any problem with DEFAULT representing a data-type-specific default
in this situation.

> Personally I would prefer "RESET STORAGE" and "RESET COMPRESSION".

Perhaps, but what's done is done, and I agree that STORAGE had better
follow the existing precedent.

I've not read the patch in any detail, but I don't see a problem
with the design.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Corey Huinker
Date:
Subject: Re: pg_dump: Refactor code that constructs ALTER ... OWNER TO commands
Next
From: Andres Freund
Date:
Subject: Re: pg_reload_conf() synchronously