diff options
Diffstat (limited to 'src/backend/utils/adt/ruleutils.c')
-rw-r--r-- | src/backend/utils/adt/ruleutils.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/backend/utils/adt/ruleutils.c b/src/backend/utils/adt/ruleutils.c index 6594a9aac70..2b7b1b0c0f6 100644 --- a/src/backend/utils/adt/ruleutils.c +++ b/src/backend/utils/adt/ruleutils.c @@ -1453,7 +1453,7 @@ pg_get_indexdef_worker(Oid indexrelid, int colno, appendStringInfoChar(&buf, ')'); if (idxrec->indnullsnotdistinct) - appendStringInfo(&buf, " NULLS NOT DISTINCT"); + appendStringInfoString(&buf, " NULLS NOT DISTINCT"); /* * If it has options, append "WITH (options)" @@ -2332,9 +2332,9 @@ pg_get_constraintdef_worker(Oid constraintId, bool fullCommand, Anum_pg_constraint_confdelsetcols, &isnull); if (!isnull) { - appendStringInfo(&buf, " ("); + appendStringInfoString(&buf, " ("); decompile_column_index_array(val, conForm->conrelid, &buf); - appendStringInfo(&buf, ")"); + appendStringInfoChar(&buf, ')'); } break; @@ -2363,7 +2363,7 @@ pg_get_constraintdef_worker(Oid constraintId, bool fullCommand, ((Form_pg_index) GETSTRUCT(indtup))->indnullsnotdistinct) appendStringInfoString(&buf, "NULLS NOT DISTINCT "); - appendStringInfoString(&buf, "("); + appendStringInfoChar(&buf, '('); /* Fetch and build target column list */ val = SysCacheGetAttr(CONSTROID, tup, @@ -3583,7 +3583,7 @@ pg_get_function_sqlbody(PG_FUNCTION_ARGS) ReleaseSysCache(proctup); - PG_RETURN_TEXT_P(cstring_to_text(buf.data)); + PG_RETURN_TEXT_P(cstring_to_text_with_len(buf.data, buf.len)); } |