Re: PL/pgSQL 2

From: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>
To: Joel Jacobson <joel(at)trustly(dot)com>, Craig Ringer <craig(at)2ndquadrant(dot)com>
Cc: Andres Freund <andres(at)2ndquadrant(dot)com>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: PL/pgSQL 2
Date: 2014-09-02 06:26:36
Message-ID: 5405631C.7050200@vmware.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 09/02/2014 09:06 AM, Joel Jacobson wrote:
> Given the needed diff between plpgsql and plpgsql2 for the changes I'm
> mostly interested in would probably be quite small,
> I'm in favour of Tom's suggestion of:
>> c) plpgsql and plpgsql2 are the same code base, with a small number
>> of places that act differently depending on the language version.
>
> That fits perfectly for my needs, as I don't want to change much.
>
> But even if we find we want to make larger mostly-compatible changes,
> maybe that also can be implemented using the same approach.
>
> For me, the most important is to not break *most* of existing plpgsql
> code, but it's OK to break *some*.
> And when breaking it, it should be trivial to rewrite it to become compatible.

I think the next step would be to list all the things you don't like
with current PL/pgSQL, and write down how you would want them to work if
you were starting with a clean slate. Let's see how wide the consensus
is that the new syntax/behavior is better than what we have now. We can
then start thinking how to best adapt them to the current PL/pgSQL
syntax and codebase. Maybe with pragmas, or new commands, or deprecating
the old behavior; the best approach depends on the details, and how
widely desired the new behavior is, so we need to see that first.

I'd suggest collecting the ideas on a wiki page, and once you have some
concrete set of features and syntax there, start a new thread to discuss
them. Others will probably have other features they want, like the
simpler "DROP TABLE ?" thing.

- Heikki

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2014-09-02 06:37:04 Re: INSERT ... ON CONFLICT {UPDATE | IGNORE}
Previous Message Joel Jacobson 2014-09-02 06:06:11 Re: PL/pgSQL 2