]> granicus.if.org Git - postgresql/commit
Improve minor error-handling details in pltcl.
authorTom Lane <tgl@sss.pgh.pa.us>
Sat, 5 Nov 2016 21:32:29 +0000 (17:32 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Sat, 5 Nov 2016 21:32:29 +0000 (17:32 -0400)
commit1b00dd0ea0f392b08fa50f9fcaf60e8f20d26dfd
tree375d212f660d10341b4c50bfe8364ce0397fa1a3
parent34ca0905706422c191b3b0afef6e1c5f54399833
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@BlueTreble.com>
src/pl/tcl/pltcl.c