Re: PL/pgSQL 2 - Mailing list pgsql-hackers

From Jan Wieck
Subject Re: PL/pgSQL 2
Date
Msg-id 540631DB.2000409@wi3ck.info
Whole thread Raw
In response to PL/pgSQL 2  (Joel Jacobson <joel@trustly.com>)
List 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



pgsql-hackers by date:

Previous
From: "Joshua D. Drake"
Date:
Subject: Re: PL/pgSQL 2
Next
From: David Johnston
Date:
Subject: Re: PL/pgSQL 2