Re: [HACKERS] Improve error handling in pltcl

2016-03-25 Thread Jim Nasby
On 3/25/16 3:11 PM, Tom Lane wrote: Jim Nasby writes: the data, we're making it unnecessarily hard. All we need is one more field in there, and you can simplify that to Ahh, nice. I think actually it's a simple point: there won't ever be a case where cursorpos is

Re: [HACKERS] Improve error handling in pltcl

2016-03-25 Thread Tom Lane
Jim Nasby writes: > On 3/17/16 5:46 PM, Tom Lane wrote: >> I started to look at this patch. It seems to me that the format of the >> errorCode output is not terribly well designed. > Getting the errorCode into an array is as easy as > array set errorData [lrange

Re: [HACKERS] Improve error handling in pltcl

2016-03-22 Thread Jim Nasby
On 3/20/16 8:42 PM, Jim Nasby wrote: The doc example also makes me think that more effort should get expended on converting internalquery/internalpos to just be query/cursorpos. It seems unlikely to me that a Tcl function could ever see a case where the latter fields are useful directly. Is

Re: [HACKERS] Improve error handling in pltcl

2016-03-20 Thread Jim Nasby
On 3/17/16 5:46 PM, Tom Lane wrote: Pavel Stehule writes: I'll mark this patch as ready for commiters. I started to look at this patch. It seems to me that the format of the errorCode output is not terribly well designed. ... Maybe there's another way. I've not

Re: [HACKERS] Improve error handling in pltcl

2016-03-19 Thread Tom Lane
Pavel Stehule writes: > I'll mark this patch as ready for commiters. I started to look at this patch. It seems to me that the format of the errorCode output is not terribly well designed. I see that Tcl constrains it to be a list starting with an

Re: [HACKERS] Improve error handling in pltcl

2016-03-19 Thread Pavel Stehule
Hi 2016-03-13 20:24 GMT+01:00 Jim Nasby : > On 3/3/16 8:51 AM, Pavel Stehule wrote: > >> Hi >> >> I am testing behave, and some results looks strange >> > > Thanks for the review! > > postgres=# \sf foo >> CREATE OR REPLACE FUNCTION public.foo() >> RETURNS void >>

Re: [HACKERS] Improve error handling in pltcl

2016-03-13 Thread Jim Nasby
On 3/3/16 8:51 AM, Pavel Stehule wrote: Hi I am testing behave, and some results looks strange Thanks for the review! postgres=# \sf foo CREATE OR REPLACE FUNCTION public.foo() RETURNS void LANGUAGE plpgsql AS $function$ begin raise exception sqlstate 'ZZ666' using message='hello,

Re: [HACKERS] Improve error handling in pltcl

2016-03-11 Thread Robert Haas
On Thu, Mar 3, 2016 at 9:51 AM, Pavel Stehule wrote: > I am testing behave, and some results looks strange Jim, this is waiting for you to respond to Pavel's review. If that doesn't happen soon, this should be marked Returned with Feedback and you can, if you wish,

Re: [HACKERS] Improve error handling in pltcl

2016-03-03 Thread Pavel Stehule
Hi I am testing behave, and some results looks strange postgres=# \sf foo CREATE OR REPLACE FUNCTION public.foo() RETURNS void LANGUAGE plpgsql AS $function$ begin raise exception sqlstate 'ZZ666' using message='hello, world', detail='hello, my world', hint = 'dont afraid'; end $function$

Re: [HACKERS] Improve error handling in pltcl

2016-03-03 Thread Pavel Stehule
Hi 2016-03-01 22:23 GMT+01:00 Jim Nasby : > On 2/29/16 10:01 PM, Tom Lane wrote: > >> Jim Nasby writes: >> >>> On 2/28/16 5:50 PM, Jim Nasby wrote: >>> Per discussion in [1], this patch improves error reporting in pltcl. >>> >> I

Re: [HACKERS] Improve error handling in pltcl

2016-03-01 Thread Jim Nasby
On 2/29/16 10:01 PM, Tom Lane wrote: Jim Nasby writes: On 2/28/16 5:50 PM, Jim Nasby wrote: Per discussion in [1], this patch improves error reporting in pltcl. I forgot to mention that this work is sponsored by Flight Aware (http://flightaware.com). Huh ... I

Re: [HACKERS] Improve error handling in pltcl

2016-02-29 Thread Tom Lane
Jim Nasby writes: > On 2/28/16 5:50 PM, Jim Nasby wrote: >> Per discussion in [1], this patch improves error reporting in pltcl. > I forgot to mention that this work is sponsored by Flight Aware > (http://flightaware.com). Huh ... I use that site. There's PG and

Re: [HACKERS] Improve error handling in pltcl

2016-02-29 Thread Jim Nasby
On 2/28/16 5:50 PM, Jim Nasby wrote: Per discussion in [1], this patch improves error reporting in pltcl. I forgot to mention that this work is sponsored by Flight Aware (http://flightaware.com). -- Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX Experts in Analytics, Data

[HACKERS] Improve error handling in pltcl

2016-02-28 Thread Jim Nasby
Per discussion in [1], this patch improves error reporting in pltcl. pltcl_error_objects.patch applies on top of the pltcl_objects_2.patch referenced in [2]. pltcl_error_master.patch applies against current master. [1]