Re: PL/pgSQL 2 - Mailing list pgsql-hackers

From Joel Jacobson
Subject Re: PL/pgSQL 2
Date
Msg-id CAASwCXd9+esuixYzaPaRoNF8KHFSb7BHAGLrS5_wxgxBDZ=N9A@mail.gmail.com
Whole thread Raw
In response to Re: PL/pgSQL 2  (Hannu Krosing <hannu@2ndQuadrant.com>)
List pgsql-hackers
On Mon, Sep 1, 2014 at 12:32 PM, Hannu Krosing <hannu@2ndquadrant.com> wrote:
> it would be
>
> ...
>     [ WITH ( [LOCAL] attribute [, ...] ) ]
>
> where LOCAL attributes are _not_ inherited by nested functions
> but the LOCALs would shadow globals in the function definitions
> that have them.
>
> I know it is easier said than done, but from the user perspective
> this could be a nice clean approach.

Drawbacks of that approach are mainly you would need to specify a lot
of attributes for newly written functions to get the behaviour you
want, and it also won't reduce the complexity of the language, rather
the contrary, the more settings and the more alternative ways of doing
things, the more complex will the implementation of the language
become. This is why postgresql is surperiour to for instance mysql, as
with mysql you need to set a lot of obscure settings to get the
desired behaviour, like making 2014-03-31 an error instead of allow
the invalid value. I wish plpgsql was just like postgresql, a very
strict language.



pgsql-hackers by date:

Previous
From: Marko Tiikkaja
Date:
Subject: Re: PL/pgSQL 2
Next
From: Craig Ringer
Date:
Subject: Re: PL/pgSQL 2