diff options
author | David Rowley <drowley@postgresql.org> | 2023-10-03 17:09:52 +1300 |
---|---|---|
committer | David Rowley <drowley@postgresql.org> | 2023-10-03 17:09:52 +1300 |
commit | 2075ba9dc9af8833b1147996c15246e44a1e4fab (patch) | |
tree | be7b822bafcf2e6fdaf7a68b56f1458e868965c8 /src/backend/utils/adt/ruleutils.c | |
parent | 6b18b3fe2c2f375d4a5d8a69b67bc59d13d4c844 (diff) | |
download | postgresql-2075ba9dc9af8833b1147996c15246e44a1e4fab.tar.gz postgresql-2075ba9dc9af8833b1147996c15246e44a1e4fab.zip |
Tidy-up some appendStringInfo*() usages
Make a few newish calls to appendStringInfo() which have no special
formatting use appendStringInfoString() instead. Also, adjust usages of
appendStringInfoString() which only append a string containing a single
character to make use of appendStringInfoChar() instead.
This makes the code marginally faster, but primarily this change is so
we use the StringInfo type as it was intended to be used.
Discussion: https://postgr.es/m/CAApHDvpXKQmL+r=VDNS98upqhr9yGBhv2Jw3GBFFk_wKHcB39A@mail.gmail.com
Diffstat (limited to 'src/backend/utils/adt/ruleutils.c')
-rw-r--r-- | src/backend/utils/adt/ruleutils.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/utils/adt/ruleutils.c b/src/backend/utils/adt/ruleutils.c index 8d5eac47916..442205382e3 100644 --- a/src/backend/utils/adt/ruleutils.c +++ b/src/backend/utils/adt/ruleutils.c @@ -10395,7 +10395,7 @@ get_func_sql_syntax(FuncExpr *expr, deparse_context *context) case F_IS_NORMALIZED: /* IS xxx NORMALIZED */ - appendStringInfoString(buf, "("); + appendStringInfoChar(buf, '('); get_rule_expr_paren((Node *) linitial(expr->args), context, false, (Node *) expr); appendStringInfoString(buf, " IS"); @@ -10884,7 +10884,7 @@ get_json_constructor(JsonConstructorExpr *ctor, deparse_context *context, } get_json_constructor_options(ctor, buf); - appendStringInfo(buf, ")"); + appendStringInfoChar(buf, ')'); } /* |