Re: [PATCH] PL/Python: Add spidata to all spiexceptions

From: "Karl O(dot) Pinc" <kop(at)meme(dot)com>
To: Jan Urbański <wulczer(at)wulczer(dot)org>, Oskari Saarenmaa <os(at)ohmu(dot)fi>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [PATCH] PL/Python: Add spidata to all spiexceptions
Date: 2012-12-12 19:21:49
Message-ID: 1355340109.26790.3@mofo
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Jan and Oskari,

On 12/12/2012 11:36:54 AM, Jan Urbański wrote:
> On 10/12/12 19:20, Karl O. Pinc wrote:
> > On 12/09/2012 10:33:59 PM, Karl O. Pinc wrote:

> > There were 2 outstanding issue raised:
> >
> > Is this useful enough/proceeding in the right direction to commit
> > now?
>
> I believe the process would be to mark it as "Ready for Committer" if
> you feel like it's ready and a then a committer would make the final
> call.

It looks acceptable to me. My concern is that there's nothing
introduced here that precludes attaching additional attributes
to the exception object to carry message, detail, and hint.
I don't see a problem, and can't see how there could be a problem
but also feel like a novice. I was looking for some assurance from
you that there's no concern here, but am confident enough regardless
to pass this aspect through to a committer for final review.

>
> > Should some of the logic be moved out of a subroutine and into the
> > calling code?
>
> I think I structured the PLy_get_spi_sqlerrcode to accept the same
> kind
> of arguments as PLy_get_spi_error_data, which means a SPIException
> object and a pointer to whatever values it can fill in.
>
> That said, I haven't really thought about that too much, so I'm
> perfectly fine with moving that bit of logic to the caller.

I can see arguments to be made for both sides. I'm asking that you
think it through to the extent you deem necessary and make
changes or not. At that point it should be ready to send
to a committer. (I'll re-test first, if you make any changes.)

Regards,

Karl <kop(at)meme(dot)com>
Free Software: "You don't pay back, you pay forward."
-- Robert A. Heinlein

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2012-12-12 20:12:26 Re: PRIVATE columns
Previous Message Jan Wieck 2012-12-12 19:13:04 Re: PRIVATE columns