Thread: pgsql: Add a "LIKE = typename" clause to CREATE TYPE for base types.

pgsql: Add a "LIKE = typename" clause to CREATE TYPE for base types.

From
tgl@postgresql.org (Tom Lane)
Date:
Log Message:
-----------
Add a "LIKE = typename" clause to CREATE TYPE for base types.  This allows
the basic representational details (typlen, typalign, typbyval, typstorage)
to be copied from an existing type rather than listed explicitly in the
CREATE TYPE command.  The immediate reason for this is to provide a simple
solution for add-on modules that want to define types represented as int8,
float4, or float8: as of 8.4 the appropriate PASSEDBYVALUE setting is
platform-specific and so it's hard for a SQL script to know what to do.

This patch fixes the contrib/isn breakage reported by Rushabh Lathia.

Modified Files:
--------------
    pgsql/contrib/isn:
        isn.sql.in (r1.8 -> r1.9)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/contrib/isn/isn.sql.in?r1=1.8&r2=1.9)
    pgsql/doc/src/sgml/ref:
        create_type.sgml (r1.78 -> r1.79)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/ref/create_type.sgml?r1=1.78&r2=1.79)
    pgsql/src/backend/commands:
        typecmds.c (r1.126 -> r1.127)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/typecmds.c?r1=1.126&r2=1.127)