Re: Allowing ALTER TYPE to change storage strategy - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Allowing ALTER TYPE to change storage strategy
Date
Msg-id 11026.1583515438@sss.pgh.pa.us
Whole thread Raw
In response to Re: Allowing ALTER TYPE to change storage strategy  ("David G. Johnston" <david.g.johnston@gmail.com>)
List pgsql-hackers
"David G. Johnston" <david.g.johnston@gmail.com> writes:
> Is there also an issue with whether the type has implemented compression or
> not - i.e., should the x->e and m->e paths be forbidden too?  Or is it
> always the case a non-plain type is compressible and the other non-plain
> options just switch between preferences (so External just says "while I can
> be compressed, please don't")?

Yeah, the only relevant issue here is "can it be toasted, or not?".  A
data type doesn't have direct control of which toasting options can be
applied, nor does it need to, as long as the C functions apply the
correct detoast macros.

> Can you please include an edit to [1] indicating that "e" is the
> abbreviation for External and "x" is Extended (spelling out the other two
> as well).  Might be worth a comment at [2] as well.
> [1] https://www.postgresql.org/docs/12/catalog-pg-type.html
> [2] https://www.postgresql.org/docs/12/storage-toast.html

Done in [1]; I didn't see much point in changing [2].

            regards, tom lane



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Allowing ALTER TYPE to change storage strategy
Next
From: Andres Freund
Date:
Subject: Re: [postgis-devel] About EXTENSION from UNPACKAGED on PostgreSQL 13