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

From Tom Lane
Subject Re: PL/PgSQL STRICT
Date
Msg-id 18066.1356108810@sss.pgh.pa.us
Whole thread Raw
In response to Re: PL/PgSQL STRICT  (Christopher Browne <cbbrowne@gmail.com>)
Responses Re: PL/PgSQL STRICT  (Pavel Stehule <pavel.stehule@gmail.com>)
Re: PL/PgSQL STRICT  (Joel Jacobson <joel@trustly.com>)
List pgsql-hackers
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.
        regards, tom lane



pgsql-hackers by date:

Previous
From: "Kevin Grittner"
Date:
Subject: Re: Review of Row Level Security
Next
From: Joe Conway
Date:
Subject: Re: Writing Trigger Functions in C