Re: proposal: PL/Pythonu - function ereport

From: Catalin Iacob <iacobcatalin(at)gmail(dot)com>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Craig Ringer <craig(at)2ndquadrant(dot)com>
Subject: Re: proposal: PL/Pythonu - function ereport
Date: 2016-02-02 06:30:24
Message-ID: CAHg_5gp802vtNd81tnnQCDRMoHeYYTSJ5mR8zGaOf0EVSVJvqg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Feb 1, 2016 at 5:37 PM, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> wrote:
> Dne 29. 1. 2016 18:09 napsal uživatel "Catalin Iacob"
> <iacobcatalin(at)gmail(dot)com>:
>> Looking at the output above, I don't see who would rely on calling
>> plpy.error with multiple arguments and getting the tuple so I'm
>> actually in favor of just breaking backward compatibility. Note that
>> passing multiple arguments isn't even documented. So I would just
>> change debug, info, error and friends to do what raise_debug,
>> raise_info, raise_error do. With a single argument behavior stays the
>> same, with multiple arguments one gets more useful behavior (detail,
>> hint) instead of the useless tuple. That's my preference but we can
>> leave the patch with raise and leave the decision to the committer.
>>
>
> if breaking compatibility, then raise* functions are useless, and should be
> removed.

Indeed. I think it's better to change the existing functions and break
compatibility instead of adding the raise_ functions. But the
committer will decide if that's what should be done. Since you wrote
the patch with raise_* I propose you keep it that way for now and let
the committer decide. I wrote the doc patch based on raise_* as well.

Attached is the doc patch (made on top of your patch). I'll wait for
you to combine them and switch to raising Error and then hopefully
this is ready for a committer to look at.

Attachment Content-Type Size
0003-Improve-docs.patch binary/octet-stream 5.7 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Joshua D. Drake 2016-02-02 06:34:26 Re: PostgreSQL Audit Extension
Previous Message Amit Langote 2016-02-02 05:54:03 Re: Way to check whether a particular block is on the shared_buffer?