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

From Joel Jacobson
Subject Re: PL/pgSQL 2
Date
Msg-id 5672084733620652485@unknownmsgid
Whole thread Raw
In response to Re: PL/pgSQL 2  (Shaun Thomas <sthomas@optionshouse.com>)
List pgsql-hackers
> On 4 sep 2014, at 15:09, Shaun Thomas <sthomas@optionshouse.com> wrote:
>
>> On 09/01/2014 04:04 AM, Joel Jacobson wrote:
>>
>> + 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.
>
> What? No. The whole point of SQL is that it's set-based and can modify multiple rows at once. Hobbling it
specificallyfor functions seems fundamentally flawed. Especially for what we purport to be a core PostgreSQL language. 

I've dropped that suggestion and is instead in favour of a keyword
like STRICT, ONE ROW, SINGLETON or [1] like suggested by others. Any
keyword or syntax will do fine, but I would prefer STRICT.

>
>> + Change all warnings into errors
>
> I... what? I could see coming up with a better exception handling mechanism for escalating messages. But you're
talkingabout taking a core element of PostgreSQL (warnings) and simply ripping them out so plpgsql2 loses even that
smallfunctionality. 

You misunderstood, I meant plpgsql warnings, that you currently can
turn into errors by setting things in the config file. Such as
shadowing of variables.

>
> I'm sure you've put a lot of thought into this, but you're not the only person using plpgsql or any, however
ambitious,potential replacement. 
>
> --
> Shaun Thomas
> OptionsHouse, LLC | 141 W. Jackson Blvd. | Suite 800 | Chicago IL, 60604
> 312-676-8870
> sthomas@optionshouse.com
>
> ______________________________________________
>
> See http://www.peak6.com/email_disclaimer/ for terms and conditions related to this email

pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: INSERT ... ON CONFLICT {UPDATE | IGNORE}
Next
From: Alvaro Herrera
Date:
Subject: Re: Scaling shared buffer eviction