Declaration of Composite Types : Type « Postgre SQL « PostgreSQL






Declaration of Composite Types

postgres=#
postgres=# -- Declaration of Composite Types
postgres=#
postgres=# CREATE TYPE complex AS (
postgres(#    r       double precision,
postgres(#    i       double precision
postgres(# );
CREATE TYPE
postgres=#
postgres=#
postgres=# drop type complex;
DROP TYPE
postgres=#

           
       








Related examples in the same category

1.Create data type
2.Using the %TYPE attribute
3.Row function with defined data type
4.Create data type and use it as a column data type