Re: PL/pgSQL 2

Поиск
Список
Период
Сортировка
От Marko Tiikkaja
Тема Re: PL/pgSQL 2
Дата
Msg-id 540A7258.90209@joh.to
обсуждение исходный текст
Ответ на Re: PL/pgSQL 2  (Kevin Grittner <kgrittn@ymail.com>)
Ответы Re: PL/pgSQL 2  (Jan Wieck <jan@wi3ck.info>)
Список pgsql-hackers
On 2014-09-02 8:52 PM, Kevin Grittner wrote:
> Marko Tiikkaja <marko@joh.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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Marko Tiikkaja
Дата:
Сообщение: Re: PL/pgSQL 1.2
Следующее
От: Peter Geoghegan
Дата:
Сообщение: Re: B-Tree support function number 3 (strxfrm() optimization)