pgsql: Improve minor error-handling details in pltcl.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Improve minor error-handling details in pltcl.
Date: 2016-11-06 02:12:42
Message-ID: E1c3Cws-0008NA-Ei@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Improve minor error-handling details in pltcl.

Don't ask Tcl_GetIndexFromObj to store an error message in the interpreter
in cases where the next argument isn't necessarily one of the options
we're asking it to check for. At best that is a waste of time, and at
worst it might cause an inappropriate error result to get left behind.

Be sure to check for valid syntax (ie, no command arguments) in
pltcl_SPI_lastoid.

Extracted from a larger and otherwise-unrelated patch.

Jim Nasby

Patch: <f2134651-14b3-efeb-f274-c69f3c084031(at)BlueTreble(dot)com>

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/1b00dd0ea0f392b08fa50f9fcaf60e8f20d26dfd

Modified Files
--------------
src/pl/tcl/pltcl.c | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2016-11-06 15:46:53 pgsql: More zic cleanup.
Previous Message Tom Lane 2016-11-05 17:48:14 pgsql: Adjust cost_merge_append() to reflect use of binaryheap_replace_