mirror of
https://github.com/postgres/postgres.git
synced 2025-06-17 17:02:08 +03:00
Add ALTER TYPE ... ADD/DROP/ALTER/RENAME ATTRIBUTE
Like with tables, this also requires allowing the existence of composite types with zero attributes. reviewed by KaiGai Kohei
This commit is contained in:
@ -839,6 +839,9 @@ transformOfType(ParseState *pstate, CreateStmtContext *cxt, TypeName *ofTypename
|
||||
Form_pg_attribute attr = tupdesc->attrs[i];
|
||||
ColumnDef *n = makeNode(ColumnDef);
|
||||
|
||||
if (attr->attisdropped)
|
||||
continue;
|
||||
|
||||
n->colname = pstrdup(NameStr(attr->attname));
|
||||
n->typeName = makeTypeNameFromOid(attr->atttypid, attr->atttypmod);
|
||||
n->constraints = NULL;
|
||||
|
Reference in New Issue
Block a user