Re: BUG #18546: Attempt to insert default into a non-updatable column of a view fails with a dubious error

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Dean Rasheed <dean.a.rasheed@gmail.com>
Cc: exclusion@gmail.com, pgsql-bugs@lists.postgresql.org
Date: 2024-07-22T14:31:21Z
Lists: pgsql-bugs
Dean Rasheed <dean.a.rasheed@gmail.com> writes:
> I had always thought that rewriteTargetListIU() only ever added or
> merged items, somehow overlooking the fact that it could also delete
> them. In my defence, it's very easy to get that impression just by
> reading the function's comments. I think it's worth updating those
> comments to mention that. Something like the attached, perhaps.

No objection here.

			regards, tom lane



Commits

  1. Correctly check updatability of columns targeted by INSERT...DEFAULT.