mirror of
https://github.com/postgres/postgres.git
synced 2025-11-10 17:42:29 +03:00
Support USING INDEX TABLESPACE clause for PRIMARY KEY and UNIQUE
constraints. Christopher Kings-Lynne.
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/nodes/copyfuncs.c,v 1.288 2004/07/12 05:37:21 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/nodes/copyfuncs.c,v 1.289 2004/08/02 04:26:05 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -1485,6 +1485,7 @@ _copyConstraint(Constraint *from)
|
||||
COPY_NODE_FIELD(raw_expr);
|
||||
COPY_STRING_FIELD(cooked_expr);
|
||||
COPY_NODE_FIELD(keys);
|
||||
COPY_STRING_FIELD(indexspace);
|
||||
|
||||
return newnode;
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/nodes/equalfuncs.c,v 1.227 2004/07/12 05:37:24 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/nodes/equalfuncs.c,v 1.228 2004/08/02 04:26:05 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -1611,6 +1611,7 @@ _equalConstraint(Constraint *a, Constraint *b)
|
||||
COMPARE_NODE_FIELD(raw_expr);
|
||||
COMPARE_STRING_FIELD(cooked_expr);
|
||||
COMPARE_NODE_FIELD(keys);
|
||||
COMPARE_STRING_FIELD(indexspace);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/nodes/outfuncs.c,v 1.240 2004/06/18 06:13:28 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/nodes/outfuncs.c,v 1.241 2004/08/02 04:26:05 tgl Exp $
|
||||
*
|
||||
* NOTES
|
||||
* Every node type that can appear in stored rules' parsetrees *must*
|
||||
@@ -1537,6 +1537,13 @@ _outConstraint(StringInfo str, Constraint *node)
|
||||
case CONSTR_PRIMARY:
|
||||
appendStringInfo(str, "PRIMARY_KEY");
|
||||
WRITE_NODE_FIELD(keys);
|
||||
WRITE_STRING_FIELD(indexspace);
|
||||
break;
|
||||
|
||||
case CONSTR_UNIQUE:
|
||||
appendStringInfo(str, "UNIQUE");
|
||||
WRITE_NODE_FIELD(keys);
|
||||
WRITE_STRING_FIELD(indexspace);
|
||||
break;
|
||||
|
||||
case CONSTR_CHECK:
|
||||
@@ -1555,11 +1562,6 @@ _outConstraint(StringInfo str, Constraint *node)
|
||||
appendStringInfo(str, "NOT_NULL");
|
||||
break;
|
||||
|
||||
case CONSTR_UNIQUE:
|
||||
appendStringInfo(str, "UNIQUE");
|
||||
WRITE_NODE_FIELD(keys);
|
||||
break;
|
||||
|
||||
default:
|
||||
appendStringInfo(str, "<unrecognized_constraint>");
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user