diff options
author | Robert Haas <rhaas@postgresql.org> | 2013-10-31 10:55:59 -0400 |
---|---|---|
committer | Robert Haas <rhaas@postgresql.org> | 2013-10-31 10:55:59 -0400 |
commit | cacbdd78106526d7c4f11f90b538f96ba8696fb0 (patch) | |
tree | 68b44c07247b99a1b316c01f66ecf0f8d6e96127 /src/backend/utils/adt/ri_triggers.c | |
parent | 343bb134ea20d3b7286c620c15a067da79cab724 (diff) | |
download | postgresql-cacbdd78106526d7c4f11f90b538f96ba8696fb0.tar.gz postgresql-cacbdd78106526d7c4f11f90b538f96ba8696fb0.zip |
Use appendStringInfoString instead of appendStringInfo where possible.
This shaves a few cycles, and generally seems like good programming
practice.
David Rowley
Diffstat (limited to 'src/backend/utils/adt/ri_triggers.c')
-rw-r--r-- | src/backend/utils/adt/ri_triggers.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/backend/utils/adt/ri_triggers.c b/src/backend/utils/adt/ri_triggers.c index 65edc1fb04e..917130fd668 100644 --- a/src/backend/utils/adt/ri_triggers.c +++ b/src/backend/utils/adt/ri_triggers.c @@ -427,7 +427,7 @@ RI_FKey_check(TriggerData *trigdata) querysep = "AND"; queryoids[i] = fk_type; } - appendStringInfo(&querybuf, " FOR KEY SHARE OF x"); + appendStringInfoString(&querybuf, " FOR KEY SHARE OF x"); /* Prepare and save the plan */ qplan = ri_PlanCheck(querybuf.data, riinfo->nkeys, queryoids, @@ -562,7 +562,7 @@ ri_Check_Pk_Match(Relation pk_rel, Relation fk_rel, querysep = "AND"; queryoids[i] = pk_type; } - appendStringInfo(&querybuf, " FOR KEY SHARE OF x"); + appendStringInfoString(&querybuf, " FOR KEY SHARE OF x"); /* Prepare and save the plan */ qplan = ri_PlanCheck(querybuf.data, riinfo->nkeys, queryoids, @@ -754,7 +754,7 @@ ri_restrict_del(TriggerData *trigdata, bool is_no_action) querysep = "AND"; queryoids[i] = pk_type; } - appendStringInfo(&querybuf, " FOR KEY SHARE OF x"); + appendStringInfoString(&querybuf, " FOR KEY SHARE OF x"); /* Prepare and save the plan */ qplan = ri_PlanCheck(querybuf.data, riinfo->nkeys, queryoids, @@ -977,7 +977,7 @@ ri_restrict_upd(TriggerData *trigdata, bool is_no_action) querysep = "AND"; queryoids[i] = pk_type; } - appendStringInfo(&querybuf, " FOR KEY SHARE OF x"); + appendStringInfoString(&querybuf, " FOR KEY SHARE OF x"); /* Prepare and save the plan */ qplan = ri_PlanCheck(querybuf.data, riinfo->nkeys, queryoids, @@ -2319,7 +2319,7 @@ RI_Initial_Check(Trigger *trigger, Relation fk_rel, Relation pk_rel) *---------- */ initStringInfo(&querybuf); - appendStringInfo(&querybuf, "SELECT "); + appendStringInfoString(&querybuf, "SELECT "); sep = ""; for (i = 0; i < riinfo->nkeys; i++) { @@ -2391,7 +2391,7 @@ RI_Initial_Check(Trigger *trigger, Relation fk_rel, Relation pk_rel) break; } } - appendStringInfo(&querybuf, ")"); + appendStringInfoChar(&querybuf, ')'); /* * Temporarily increase work_mem so that the check query can be executed |