mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-12-21 08:29:39 +08:00
Document COLLATE option in CREATE TYPE reference page.
Curiously, it was already documented in ALTER TYPE ADD ATTRIBUTE, but not here.
This commit is contained in:
parent
acfa1f45ed
commit
2d4617126f
@ -22,7 +22,7 @@ PostgreSQL documentation
|
|||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<synopsis>
|
<synopsis>
|
||||||
CREATE TYPE <replaceable class="parameter">name</replaceable> AS
|
CREATE TYPE <replaceable class="parameter">name</replaceable> AS
|
||||||
( [ <replaceable class="PARAMETER">attribute_name</replaceable> <replaceable class="PARAMETER">data_type</replaceable> [, ... ] ] )
|
( [ <replaceable class="PARAMETER">attribute_name</replaceable> <replaceable class="PARAMETER">data_type</replaceable> [ COLLATE <replaceable>collation</replaceable> ] [, ... ] ] )
|
||||||
|
|
||||||
CREATE TYPE <replaceable class="parameter">name</replaceable> AS ENUM
|
CREATE TYPE <replaceable class="parameter">name</replaceable> AS ENUM
|
||||||
( [ '<replaceable class="parameter">label</replaceable>' [, ... ] ] )
|
( [ '<replaceable class="parameter">label</replaceable>' [, ... ] ] )
|
||||||
@ -77,11 +77,12 @@ CREATE TYPE <replaceable class="parameter">name</replaceable>
|
|||||||
The first form of <command>CREATE TYPE</command>
|
The first form of <command>CREATE TYPE</command>
|
||||||
creates a composite type.
|
creates a composite type.
|
||||||
The composite type is specified by a list of attribute names and data types.
|
The composite type is specified by a list of attribute names and data types.
|
||||||
This is essentially the same as the row type
|
An attribute's collation can be specified too, if its data type is
|
||||||
|
collatable. A composite type is essentially the same as the row type
|
||||||
of a table, but using <command>CREATE TYPE</command> avoids the need to
|
of a table, but using <command>CREATE TYPE</command> avoids the need to
|
||||||
create an actual table when all that is wanted is to define a type.
|
create an actual table when all that is wanted is to define a type.
|
||||||
A stand-alone composite type is useful as the argument or return type of a
|
A stand-alone composite type is useful, for example, as the argument or
|
||||||
function.
|
return type of a function.
|
||||||
</para>
|
</para>
|
||||||
</refsect2>
|
</refsect2>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user