Re: BUG #14706: Dependencies not recorded properly for base types
Heikki Linnakangas <hlinnaka@iki.fi>
From: Heikki Linnakangas <hlinnaka@iki.fi>
To: Michael Paquier <michael.paquier@gmail.com>, Tom Lane <tgl@sss.pgh.pa.us>
Cc: khuddleston@pivotal.io,
PostgreSQL mailing lists <pgsql-bugs@postgresql.org>
Date: 2017-06-15T07:49:08Z
Lists: pgsql-bugs
Attachments
- 0001-Fix-dependency-when-changing-a-function-s-argument-r.patch (invalid/octet-stream)
On 06/15/2017 09:51 AM, Michael Paquier wrote: > On Thu, Jun 15, 2017 at 3:05 PM, Michael Paquier > <michael.paquier@gmail.com> wrote: >> Attached is an idea of patch, inputs welcome. Another idea would be to >> deprecate things on HEAD and cause an ERROR when doing such things. > > Not completely bullet-proof actually. As SetFunctionArgType() can be > called, arguments of a function could be changed, leading to lookup > errors. Attached is an updated patch with more regression tests. Hmm. Strictly speaking there's no need to update the dependency when changing opaque into cstring. Because cstring is a pinned type, recordDependency will do nothing for it. But in any case, I think it'd be better and simpler to fix the dependency in SetFunctionArgType() and SetFunctionReturnType() functions themselves. They're the ones that change the type, they ought to be responsible for fixing the dependency too. See attached. - Heikki
Commits
-
Fix dependency, when changing a function's argument/return type.
- ac93a78b0e51 9.2.22 landed
- 6338b50b9335 9.4.13 landed
- b47e2f7a9463 9.3.18 landed
- 501e6f8b7875 9.5.8 landed
- a9a5eb32b384 9.6.4 landed
- 30681c830d69 10.0 landed