Commit 832a12f6 authored by Alvaro Herrera's avatar Alvaro Herrera

DefineType: return base type OID, not its array

Event triggers want to know the OID of the interesting object created,
which is the main type.  The array created as part of the operation is
just a subsidiary object which is not of much interest.
parent 301fcf33
...@@ -596,7 +596,7 @@ DefineType(List *names, List *parameters) ...@@ -596,7 +596,7 @@ DefineType(List *names, List *parameters)
/* alignment must be 'i' or 'd' for arrays */ /* alignment must be 'i' or 'd' for arrays */
alignment = (alignment == 'd') ? 'd' : 'i'; alignment = (alignment == 'd') ? 'd' : 'i';
typoid = TypeCreate(array_oid, /* force assignment of this type OID */ TypeCreate(array_oid, /* force assignment of this type OID */
array_type, /* type name */ array_type, /* type name */
typeNamespace, /* namespace */ typeNamespace, /* namespace */
InvalidOid, /* relation oid (n/a here) */ InvalidOid, /* relation oid (n/a here) */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment