Re: Assertions in PL/PgSQL

From: Marko Tiikkaja <marko(at)joh(dot)to>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Assertions in PL/PgSQL
Date: 2013-09-20 10:24:33
Message-ID: 523C2261.1010803@joh.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 9/19/13 9:09 PM, Robert Haas wrote:
> Personally, I'm pretty skeptical about the value of adding dedicated
> syntax for this. I mean, I'll be the first to admit that PL/pgsql is
> a clunky and awkward language. But somebody's always proposing
> something that they think will make it better, and I feel somehow that
> if we accept all of those proposals at face value, we'll just end up
> with a mess. So IMHO the bar for adding new syntax to PL/pgsql should
> be reasonably high. YMMV, of course, and probably does.

I see where you're coming from, and agree, to an extent.

> The issue of how this is spelled is somewhat secondary for me. I
> think ASSERT is probably as good as anything. But let's not kid
> ourselves: even reserving this word only in PL/pgsql WILL break things
> for some users, and there are LOTS of people out there with LOTS of
> procedural code. Every tiny backward-incompatibility reduces by just
> a little bit the percentage of those people who can upgrade and
> increases the delay before they do. This is an area where past
> experience has made me quite wary.

The thing is, what this means is that to add a new feature to the
language, you have to make the syntax so damn ugly that no one wants to
use it (see row_count, for example) or you will break some poor user's
function. And now we got all this cool functionality which nobody wants
to use, and the language itself actually gets progressively worse. All
this is starting to sound like it's already too late to make PL/PgSQL
better, and we should just start afresh.

Regards,
Marko Tiikkaja

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Samrat Revagade 2013-09-20 10:29:01 Re: psql tab completion for updatable foreign tables
Previous Message Martijn van Oosterhout 2013-09-20 10:21:28 Re: record identical operator - Review