From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
Cc: | Julien Rouhaud <rjuju123(at)gmail(dot)com>, Bryn Llewellyn <bryn(at)yugabyte(dot)com>, pgsql-general list <pgsql-general(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Re: Unexpected result from ALTER FUNCTION— looks like a bug |
Date: | 2022-04-20 03:32:08 |
Message-ID: | 2715948.1650425528@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
"David G. Johnston" <david(dot)g(dot)johnston(at)gmail(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Ram Pratap Maurya | 2022-04-20 04:31:57 | RE: Huge archive log generate in Postgresql-13 |
Previous Message | David G. Johnston | 2022-04-20 03:15:18 | Re: Unexpected result from ALTER FUNCTION— looks like a bug |