Re: plpgsql defensive mode

From: Marko Tiikkaja <marko(at)joh(dot)to>
To: Joel Jacobson <joel(at)trustly(dot)com>
Cc: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: plpgsql defensive mode
Date: 2014-09-06 14:53:44
Message-ID: 540B1FF8.1010602@joh.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2014-09-06 4:41 PM, Joel Jacobson wrote:
>> On 6 sep 2014, at 16:32, Marko Tiikkaja <marko(at)joh(dot)to> wrote:
>>
>> How do you run queries which affect more than one row in this mode? Because that's crucial as well. We want something we can run 100% of our code on, but with a slightly more convenient syntax than PL/PgSQL provides right when coding defensively in the cases where exactly one row should be affected.
>
> If we would have ORDER BY also for UPDATE/DELETE then one could just
> order by something arbitrary to express multiple or zero rows are OK,
> even if not being interested in the order.

Ugh. That can't possibly end well. Overriding the meaning of something
that already works as standalone SQL statement sounds like a really bad
idea.

.marko

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Stephen Frost 2014-09-06 15:16:27 Re: A mechanism securing web applications in DBMS
Previous Message Bruce Momjian 2014-09-06 14:45:31 Re: pg_dump warnings in MinGW build