Add a "LIKE = typename" clause to CREATE TYPE for base types. This allows

Tom Lane <tgl@sss.pgh.pa.us>

Commit: 3f936aacc057e4b391ab953fea2ffb689a12a8bc
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2008-11-30T19:01:29Z
Releases: 8.4.0
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.

Files

PathChange+/−
contrib/isn/isn.sql.in modified +9 −25
doc/src/sgml/ref/create_type.sgml modified +33 −1
src/backend/commands/typecmds.c modified +166 −85