pgsql: Merge two copies of tuple-building code in pltcl.c.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Merge two copies of tuple-building code in pltcl.c.
Date: 2017-01-06 21:22:18
Message-ID: [email protected]
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Merge two copies of tuple-building code in pltcl.c.

Make pltcl_trigger_handler() construct modified tuples using
pltcl_build_tuple_result(), rather than its own copy of essentially
the same logic. This results in slightly different message wording for
the error cases, and in one case a different SQLSTATE, but it seems
unlikely that any existing applications are depending on any of those
details.

While at it, fix a typo in commit 26abb50c4: pltcl_build_tuple_result was
applying encoding conversion in the wrong direction. That would be a
back-patchable bug fix, except the code hasn't shipped yet.

Jim Nasby, reviewed by me

Discussion: https://postgr.es/m/[email protected]

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/de5fed0d0c704e3d1a928bf420663319d898cee4

Modified Files
--------------
src/pl/tcl/pltcl.c | 113 ++++++++++++++++++-----------------------------------
1 file changed, 39 insertions(+), 74 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Stephen Frost 2017-01-06 21:29:48 pgsql: Add basic pg_dumpall/pg_restore TAP tests
Previous Message Stephen Frost 2017-01-06 20:28:34 pgsql: Protect against NULL-dereference in pg_dump