Re: PL/pgSQL 2

From: Jan Wieck <jan(at)wi3ck(dot)info>
To: Joel Jacobson <joel(at)trustly(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: PL/pgSQL 2
Date: 2014-09-02 21:08:43
Message-ID: 540631DB.2000409@wi3ck.info
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Without having read the entire thread ...

On 09/01/2014 05:04 AM, Joel Jacobson wrote:
> From the top of my head, these are Things I personally would want to
> see in plpgsql2:
> + Make UPDATE/INSERT/DELETE throw error if they didnt' modify exactly 1
> row, as that's the most common use-case, and provide alternative syntax
> to modify multiple or zero rows.

I think this is a completely flawed proposal "by definition". SQL itself
does not make such assumption and as a SET oriented language, never
should. A SET is zero or more tuples. Would you also suggest that the
PostgreSQL backend throw an ERROR if an UPDATE/INSERT/DELETE doesn't
modify exactly 1 row? If not, explain why there should be a difference
between SQL executed from the frontend and SQL executed by a PL/pgSQL
function.

-1 from me.

> + Change all warnings into errors

I suggest being slightly more selective on that one.

Regards,
Jan

--
Jan Wieck
Senior Software Engineer
http://slony.info

In response to

  • PL/pgSQL 2 at 2014-09-01 09:04:53 from Joel Jacobson

Browse pgsql-hackers by date

  From Date Subject
Next Message David Johnston 2014-09-02 21:11:49 Re: PL/pgSQL 2
Previous Message Joshua D. Drake 2014-09-02 20:48:44 Re: PL/pgSQL 2