Re: Re: Unexpected result from ALTER FUNCTION— looks like a bug
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: "David G. Johnston" <david.g.johnston@gmail.com>
Cc: Julien Rouhaud <rjuju123@gmail.com>, Bryn Llewellyn <bryn@yugabyte.com>,
pgsql-general list <pgsql-general@lists.postgresql.org>
Date: 2022-04-20T03:32:08Z
Lists: pgsql-general
"David G. Johnston" <david.g.johnston@gmail.com> writes: > Might I suggest the following: > + /* > + * For each action, modify procForm to type-safely set the new value. > + * However, because the SET clause is repeatable we handle it > + * a bit differently, modifying the underlying tuple directly. So > + * make sure to leave that conditional block for last. + */ Actually, the reason proconfig is handled differently is that it's a variable-length field, so it can't be represented in the C struct that we overlay onto the catalog tuple to access the fixed-width fields cheaply. I'm not sure that insisting that that stanza be last is especially useful advice for future hackers, because someday there might be more than one variable-length field that this function needs to update. regards, tom lane
Commits
-
Fix breakage in AlterFunction().
- f583633bc130 13.7 landed
- 9130f8cbb919 11.16 landed
- 481a99811a41 12.11 landed
- 409bcfda6bd6 10.21 landed
- 344a225cb9d4 15.0 landed
- 08a9e7a8c791 14.3 landed