1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-31 22:04:40 +03:00

Allow ALTER TYPE to update an existing type's typsubscript value.

This is essential if we'd like to allow existing extension data types
to support subscripting in future, since dropping and recreating the
type isn't a practical thing for an extension upgrade script, and
direct manipulation of pg_type isn't a great answer either.

There was some discussion about also allowing alteration of typelem,
but it's less clear whether that's a good idea or not, so for now
I forebore.

Discussion: https://postgr.es/m/3724341.1607551174@sss.pgh.pa.us
This commit is contained in:
Tom Lane
2020-12-11 18:07:02 -05:00
parent 653aa603f5
commit 8c15a29745
4 changed files with 54 additions and 22 deletions

View File

@ -194,6 +194,14 @@ ALTER TYPE <replaceable class="parameter">name</replaceable> SET ( <replaceable
requires superuser privilege.
</para>
</listitem>
<listitem>
<para>
<literal>SUBSCRIPT</literal> can be set to the name of a type-specific
subscripting handler function, or <literal>NONE</literal> to remove
the type's subscripting handler function. Using this option
requires superuser privilege.
</para>
</listitem>
<listitem>
<para>
<literal>STORAGE</literal><indexterm>