mirror of
https://github.com/postgres/postgres.git
synced 2025-11-07 19:06:32 +03:00
Fix crash when partitioned column specified twice.
Amit Langote, reviewed by Beena Emerson Discussion: http://postgr.es/m/6ed23d3d-c09d-4cbc-3628-0a8a32f750f4@lab.ntt.co.jp
This commit is contained in:
@@ -2804,6 +2804,7 @@ _copyColumnDef(const ColumnDef *from)
|
||||
COPY_SCALAR_FIELD(is_local);
|
||||
COPY_SCALAR_FIELD(is_not_null);
|
||||
COPY_SCALAR_FIELD(is_from_type);
|
||||
COPY_SCALAR_FIELD(is_from_parent);
|
||||
COPY_SCALAR_FIELD(storage);
|
||||
COPY_NODE_FIELD(raw_default);
|
||||
COPY_NODE_FIELD(cooked_default);
|
||||
|
||||
@@ -2540,6 +2540,7 @@ _equalColumnDef(const ColumnDef *a, const ColumnDef *b)
|
||||
COMPARE_SCALAR_FIELD(is_local);
|
||||
COMPARE_SCALAR_FIELD(is_not_null);
|
||||
COMPARE_SCALAR_FIELD(is_from_type);
|
||||
COMPARE_SCALAR_FIELD(is_from_parent);
|
||||
COMPARE_SCALAR_FIELD(storage);
|
||||
COMPARE_NODE_FIELD(raw_default);
|
||||
COMPARE_NODE_FIELD(cooked_default);
|
||||
|
||||
@@ -494,6 +494,7 @@ makeColumnDef(const char *colname, Oid typeOid, int32 typmod, Oid collOid)
|
||||
n->is_local = true;
|
||||
n->is_not_null = false;
|
||||
n->is_from_type = false;
|
||||
n->is_from_parent = false;
|
||||
n->storage = 0;
|
||||
n->raw_default = NULL;
|
||||
n->cooked_default = NULL;
|
||||
|
||||
@@ -2766,6 +2766,7 @@ _outColumnDef(StringInfo str, const ColumnDef *node)
|
||||
WRITE_BOOL_FIELD(is_local);
|
||||
WRITE_BOOL_FIELD(is_not_null);
|
||||
WRITE_BOOL_FIELD(is_from_type);
|
||||
WRITE_BOOL_FIELD(is_from_parent);
|
||||
WRITE_CHAR_FIELD(storage);
|
||||
WRITE_NODE_FIELD(raw_default);
|
||||
WRITE_NODE_FIELD(cooked_default);
|
||||
|
||||
Reference in New Issue
Block a user