From: | Andres Freund <andres(at)2ndquadrant(dot)com> |
---|---|
To: | Marko Tiikkaja <marko(at)joh(dot)to> |
Cc: | Hannu Krosing <hannu(at)2ndQuadrant(dot)com>, Joel Jacobson <joel(at)trustly(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: PL/pgSQL 2 |
Date: | 2014-09-01 10:55:59 |
Message-ID: | 20140901105559.GD7400@awork2.anarazel.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 2014-09-01 12:49:22 +0200, Marko Tiikkaja wrote:
> On 9/1/14 12:12 PM, Andres Freund wrote:
> >On 2014-09-01 12:00:48 +0200, Marko Tiikkaja wrote:
> >>On 9/1/14 11:53 AM, Hannu Krosing wrote:
> >>>>You're going to have to find a more gradual way of doing this.
> >>>Probably a better way (and there has been some talk of it) is
> >>>having some kind of PRAGMA functionality, or pl/pgsql specific
> >>>LOCAL SET to affect "just this function" and not spill to nested
> >>>functions as is the case for SETs now.
> >>
> >>I can't imagine how that would work for anyone who has thousands of
> >>functions.
> >
> >How's that fundamentally different from changing languages? If we had a
> >way to *add* such attributes to *existing* functions I don't see the
> >fundamental problem?
>
> Adding 5-10 of these for every function you create seems significantly more
> painful than saying "this function uses plpgsql2". Though perhaps what's
> being suggested is a *single* option which changes everything at once? Then
> there wouldn't be a huge difference.
The likelihood of us now knowing all the things that we want to break
rigth now seems about zero. There *will* be further ones. If we go with
the approach of creating new language versions for all of them we'll end
up with a completely unmaintainable mess. For PG devs, application dev
and DBAs.
Since what you seemingly want - sensibly so imo - is to set the default
errors for *new* functions, but leave the old set of errors for
preexisting ones, I suggest adding a GUC that defines the set of
warnings/errors *new* functions get. There'd need to be some syntax to
opt out for pg_dump and similar, but that sounds unproblematic.
One question here imo is whether we design something for plpgsql or more
generic...
Greetings,
Andres Freund
--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Craig Ringer | 2014-09-01 11:08:22 | Adding 'crosstab' variants returning refcursor? |
Previous Message | Craig Ringer | 2014-09-01 10:53:04 | Re: PL/pgSQL 2 |