SnowConvert AI - PostgreSQL / Greenplum / Netezza - CREATE TYPE¶
This page describes how SnowConvert translates source CREATE TYPE statements for PostgreSQL-family dialects to Snowflake native user-defined types where supported.
PostgreSQL¶
PostgreSQL composite types declared with CREATE TYPE name AS (...) are translated to Snowflake CREATE TYPE ... AS OBJECT (...). Other variants (for example ENUM, RANGE, CREATE TYPE ... AS BASE) follow separate rules or default handling and may emit conversion issues.
Composite types¶
Source (PostgreSQL):
Snowflake equivalent:
With schema¶
Source (PostgreSQL):
Snowflake equivalent:
Single attribute¶
Source (PostgreSQL):
Snowflake equivalent:
Notes: Non-composite CREATE TYPE forms are not covered in full on this page; consult EWIs/FDMs and the issue catalogs for enumerations and other definitions.
Greenplum¶
Greenplum inherits PostgreSQL-style composite types. SnowConvert maps CREATE TYPE name AS (...) to Snowflake CREATE TYPE ... AS OBJECT (...), consistent with the PostgreSQL translation path.
Source (Greenplum):
Snowflake equivalent:
Notes: For additional CREATE TYPE variants (for example ENUM), see PostgreSQL-oriented rules and issue catalogs; Greenplum shares the same replacer family as PostgreSQL for supported composite patterns.
Netezza¶
Netezza SQL uses the same shared ANSI-style CREATE TYPE transformation pipeline as Db2 for the patterns below (scalar alias and attribute-list composite types).
Type alias (CREATE TYPE ... AS scalar)¶
When the parser produces a predefined (scalar) body, Snowflake receives a normalized CREATE TYPE name AS <datatype>.
Illustrative source (Netezza-style alias):
Snowflake equivalent:
Structured type (attribute list)¶
CREATE TYPE name AS (attr type, ...) maps to Snowflake OBJECT(...).
Illustrative source:
Snowflake equivalent:
Notes: Db2 CREATE DISTINCT TYPE is not a Netezza construct; for IBM Db2 distinct types, see CREATE TYPE (IBM DB2). Oracle and other dialects have separate translation references.