Re: Re: Unexpected result from ALTER FUNCTION— looks like a bug - Mailing list pgsql-general

From Tom Lane
Subject Re: Re: Unexpected result from ALTER FUNCTION— looks like a bug
Date
Msg-id 2715948.1650425528@sss.pgh.pa.us
Whole thread Raw
In response to Re: Unexpected result from ALTER FUNCTION— looks like a bug  ("David G. Johnston" <david.g.johnston@gmail.com>)
Responses Re: Unexpected result from ALTER FUNCTION— looks like a bug  (Bryn Llewellyn <bryn@yugabyte.com>)
List 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



pgsql-general by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: Unexpected result from ALTER FUNCTION— looks like a bug
Next
From: Ram Pratap Maurya
Date:
Subject: RE: Huge archive log generate in Postgresql-13