Re: proposal: PL/Pythonu - function ereport

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

Dne 2. 2. 2016 7:30 napsal uživatel "Catalin Iacob" <iacobcatalin(at)gmail(dot)com
>:
>
> 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.

If we decided to break compatibility, then we have to do explicitly. Thid
discussion can continue with commiter, but send path with duplicitly
defined functions has not sense for me. Currently I out of office, so I
cannot to clean it. 4.2 I should to work usually

>
> 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.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jim Nasby 2016-02-02 14:52:02 Re: Add links to commit fests to patch summary page
Previous Message Amit Kapila 2016-02-02 14:12:14 Re: RFC: replace pg_stat_activity.waiting with something more descriptive