Re: PL/PgSQL STRICT - Mailing list pgsql-hackers

From Pavel Stehule
Subject Re: PL/PgSQL STRICT
Date
Msg-id CAFj8pRAT1uPGghq1ZQ8PbBa3EdheBW1o5maiPOeXdZwNjTff=g@mail.gmail.com
Whole thread Raw
In response to Re: PL/PgSQL STRICT  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
2012/12/21 Tom Lane <tgl@sss.pgh.pa.us>:
> Christopher Browne <cbbrowne@gmail.com> writes:
>> This is adding specific syntax for what seems like an unusual case to me,
>> which seems like an unworthwhile complication.
>
> That was my first reaction too, but Marko's followon examples seem to
> make a reasonable case for it.  There are many situations where you
> expect an UPDATE or DELETE to hit exactly one row.  Often, programmers
> won't bother to add code to check that it did ... but if a one-word
> addition to the command can provide such a check, it seems more likely
> that they would add the check.

and it can be used for optimization - it can be optimized for fast first row

Regards

Pavel

>
>                         regards, tom lane
>
>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers



pgsql-hackers by date:

Previous
From: Christopher Browne
Date:
Subject: Re: Writing Trigger Functions in C
Next
From: Pavel Stehule
Date:
Subject: Re: Writing Trigger Functions in C