Re: PL/pgSQL 2

From: Marko Tiikkaja <marko(at)joh(dot)to>
To: Kevin Grittner <kgrittn(at)ymail(dot)com>, Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>, Joel Jacobson <joel(at)trustly(dot)com>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: PL/pgSQL 2
Date: 2014-09-06 02:32:56
Message-ID: 540A7258.90209@joh.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2014-09-02 8:52 PM, Kevin Grittner wrote:
> Marko Tiikkaja <marko(at)joh(dot)to> wrote:
>
>> Sounds like in this case you'd only use set-oriented programming
>> at the end of the transaction, no?
>
> I guess -- more properly I would say "in the final database
> transaction for that financial transaction."

Yes, I should have said "financial transaction", but I hit send a bit
too early.

> And no, that never
> made me wish that plpgsql functions defaulted to throwing errors
> for DML statements that affected more than one row.

Fine. But you should still be able to see the point we're trying to
make. The number one is special, and it's present everywhere. If you
want to program defensively, you have to go through a lot of pain right
now. We're looking for a way to alleviate that pain. Defaulting to
throwing errors would be one way to do it, but that's not what's being
suggested here anymore.

You can dismiss what we're doing by saying that it doesn't follow the
best practices or we just want an interface for a key-value store or
whatever. And yes, to some extent, a simple interface for a key-value
store would come in handy. But we still have the 5-15% (big part of it
being the reporting we need to do) of the code that *doesn't* want that,
*and* we want to use all of the Postgres features where applicable.

.marko

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2014-09-06 02:45:00 Re: B-Tree support function number 3 (strxfrm() optimization)
Previous Message Marko Tiikkaja 2014-09-06 02:25:09 Re: PL/pgSQL 1.2