Re: BUG #14706: Dependencies not recorded properly for base types

From: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
To: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: khuddleston(at)pivotal(dot)io, PostgreSQL mailing lists <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #14706: Dependencies not recorded properly for base types
Date: 2017-06-15 07:49:08
Message-ID: 91122adb-3afc-a727-c4c9-478175729f56@iki.fi
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On 06/15/2017 09:51 AM, Michael Paquier wrote:
> On Thu, Jun 15, 2017 at 3:05 PM, Michael Paquier
> <michael(dot)paquier(at)gmail(dot)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

Attachment Content-Type Size
0001-Fix-dependency-when-changing-a-function-s-argument-r.patch invalid/octet-stream 5.7 KB

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Rohit Dwivedi 2017-06-15 10:43:13 Regarding copy of function from one db to another db
Previous Message jaroslav.zaruba 2017-06-15 07:08:53 BUG #14707: pgAdmin4 does not start