aboutsummaryrefslogtreecommitdiff
path: root/src/backend/nodes/outfuncs.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/nodes/outfuncs.c')
-rw-r--r--src/backend/nodes/outfuncs.c128
1 files changed, 0 insertions, 128 deletions
diff --git a/src/backend/nodes/outfuncs.c b/src/backend/nodes/outfuncs.c
index 25171864dbf..2c30bba2124 100644
--- a/src/backend/nodes/outfuncs.c
+++ b/src/backend/nodes/outfuncs.c
@@ -704,134 +704,6 @@ _outA_Const(StringInfo str, const A_Const *node)
WRITE_LOCATION_FIELD(location);
}
-static void
-_outConstraint(StringInfo str, const Constraint *node)
-{
- WRITE_NODE_TYPE("CONSTRAINT");
-
- WRITE_STRING_FIELD(conname);
- WRITE_BOOL_FIELD(deferrable);
- WRITE_BOOL_FIELD(initdeferred);
- WRITE_LOCATION_FIELD(location);
-
- appendStringInfoString(str, " :contype ");
- switch (node->contype)
- {
- case CONSTR_NULL:
- appendStringInfoString(str, "NULL");
- break;
-
- case CONSTR_NOTNULL:
- appendStringInfoString(str, "NOT_NULL");
- WRITE_NODE_FIELD(keys);
- WRITE_INT_FIELD(inhcount);
- WRITE_BOOL_FIELD(is_no_inherit);
- WRITE_BOOL_FIELD(skip_validation);
- WRITE_BOOL_FIELD(initially_valid);
- break;
-
- case CONSTR_DEFAULT:
- appendStringInfoString(str, "DEFAULT");
- WRITE_NODE_FIELD(raw_expr);
- WRITE_STRING_FIELD(cooked_expr);
- break;
-
- case CONSTR_IDENTITY:
- appendStringInfoString(str, "IDENTITY");
- WRITE_NODE_FIELD(options);
- WRITE_CHAR_FIELD(generated_when);
- break;
-
- case CONSTR_GENERATED:
- appendStringInfoString(str, "GENERATED");
- WRITE_NODE_FIELD(raw_expr);
- WRITE_STRING_FIELD(cooked_expr);
- WRITE_CHAR_FIELD(generated_when);
- break;
-
- case CONSTR_CHECK:
- appendStringInfoString(str, "CHECK");
- WRITE_BOOL_FIELD(is_no_inherit);
- WRITE_NODE_FIELD(raw_expr);
- WRITE_STRING_FIELD(cooked_expr);
- WRITE_BOOL_FIELD(skip_validation);
- WRITE_BOOL_FIELD(initially_valid);
- break;
-
- case CONSTR_PRIMARY:
- appendStringInfoString(str, "PRIMARY_KEY");
- WRITE_NODE_FIELD(keys);
- WRITE_BOOL_FIELD(without_overlaps);
- WRITE_NODE_FIELD(including);
- WRITE_NODE_FIELD(options);
- WRITE_STRING_FIELD(indexname);
- WRITE_STRING_FIELD(indexspace);
- WRITE_BOOL_FIELD(reset_default_tblspc);
- /* access_method and where_clause not currently used */
- break;
-
- case CONSTR_UNIQUE:
- appendStringInfoString(str, "UNIQUE");
- WRITE_BOOL_FIELD(nulls_not_distinct);
- WRITE_NODE_FIELD(keys);
- WRITE_BOOL_FIELD(without_overlaps);
- WRITE_NODE_FIELD(including);
- WRITE_NODE_FIELD(options);
- WRITE_STRING_FIELD(indexname);
- WRITE_STRING_FIELD(indexspace);
- WRITE_BOOL_FIELD(reset_default_tblspc);
- /* access_method and where_clause not currently used */
- break;
-
- case CONSTR_EXCLUSION:
- appendStringInfoString(str, "EXCLUSION");
- WRITE_NODE_FIELD(exclusions);
- WRITE_NODE_FIELD(including);
- WRITE_NODE_FIELD(options);
- WRITE_STRING_FIELD(indexname);
- WRITE_STRING_FIELD(indexspace);
- WRITE_BOOL_FIELD(reset_default_tblspc);
- WRITE_STRING_FIELD(access_method);
- WRITE_NODE_FIELD(where_clause);
- break;
-
- case CONSTR_FOREIGN:
- appendStringInfoString(str, "FOREIGN_KEY");
- WRITE_NODE_FIELD(pktable);
- WRITE_NODE_FIELD(fk_attrs);
- WRITE_NODE_FIELD(pk_attrs);
- WRITE_CHAR_FIELD(fk_matchtype);
- WRITE_CHAR_FIELD(fk_upd_action);
- WRITE_CHAR_FIELD(fk_del_action);
- WRITE_NODE_FIELD(fk_del_set_cols);
- WRITE_NODE_FIELD(old_conpfeqop);
- WRITE_OID_FIELD(old_pktable_oid);
- WRITE_BOOL_FIELD(skip_validation);
- WRITE_BOOL_FIELD(initially_valid);
- break;
-
- case CONSTR_ATTR_DEFERRABLE:
- appendStringInfoString(str, "ATTR_DEFERRABLE");
- break;
-
- case CONSTR_ATTR_NOT_DEFERRABLE:
- appendStringInfoString(str, "ATTR_NOT_DEFERRABLE");
- break;
-
- case CONSTR_ATTR_DEFERRED:
- appendStringInfoString(str, "ATTR_DEFERRED");
- break;
-
- case CONSTR_ATTR_IMMEDIATE:
- appendStringInfoString(str, "ATTR_IMMEDIATE");
- break;
-
- default:
- elog(ERROR, "unrecognized ConstrType: %d", (int) node->contype);
- break;
- }
-}
-
/*
* outNode -