Re: [HACKERS] Increase pltcl test coverage
От | Jim Nasby |
---|---|
Тема | Re: [HACKERS] Increase pltcl test coverage |
Дата | |
Msg-id | e1d4ff4a-5bfe-c462-5f8e-d072d39a3be3@BlueTreble.com обсуждение исходный текст |
Ответ на | Re: [HACKERS] Increase pltcl test coverage (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: [HACKERS] Increase pltcl test coverage
|
Список | pgsql-hackers |
On 1/8/17 11:25 AM, Tom Lane wrote: > But I don't understand > how you got the sample output shown in the patch. Is this based > on some unsubmitted changes in pltcl's error handling? AFAICT you've got everything. What I had on my end is: create function public.tcl_error_handling_test(text) returns text language pltcl as $function$ if {[catch $1 err]} { # Set keys that will change over time to fixed values array set myArray $::errorCode set myArray(funcname) "'funcname'" set myArray(lineno) 'lineno' set myArray(POSTGRES) 'POSTGRES' # Format into something nicer set vals [] foreach {key} [lsort [array names myArray]] { set value [string map {"\n" "\n\t"} $myArray($key)] lappend vals "$key: $value" } return [join $vals "\n"] } else { return "no error" } $function$ ; Maybe it's a version difference? echo 'puts [info patchlevel];exit 0' | tclsh 8.6.6 Anyway, attached is a complete new patch that fixes that issue (and a couple test diffs I missed :/), as well as the utf_e2u issue you discovered. I've applied this patch to master via git apply and run it through make check-world, so hopefully this puts the horse out to pasture. -- Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX Experts in Analytics, Data Architecture and PostgreSQL Data in Trouble? Get it in Treble! http://BlueTreble.com 855-TREBLE2 (855-873-2532) -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Вложения
В списке pgsql-hackers по дате отправления: