Re: Behavior of PL/pgSQL function following drop and re-create of a table that it uses - Mailing list pgsql-general

From Tom Lane
Subject Re: Behavior of PL/pgSQL function following drop and re-create of a table that it uses
Date
Msg-id 121427.1678250955@sss.pgh.pa.us
Whole thread Raw
In response to Re: Behavior of PL/pgSQL function following drop and re-create of a table that it uses  ("David G. Johnston" <david.g.johnston@gmail.com>)
Responses Re: Behavior of PL/pgSQL function following drop and re-create of a table that it uses  ("David G. Johnston" <david.g.johnston@gmail.com>)
Re: Behavior of PL/pgSQL function following drop and re-create of a table that it uses  (Bryn Llewellyn <bryn@yugabyte.com>)
List pgsql-general
"David G. Johnston" <david.g.johnston@gmail.com> writes:
> So I found where this difference in behavior is at least explicitly noted:

>/*
> * If it's a named composite type (or domain over one), find the typcache
> * entry and record the current tupdesc ID, so we can detect changes
> * (including drops).  We don't currently support on-the-fly replacement
> * of non-composite types, else we might want to do this for them too.
> */

I'm not quite sure that that's related, really.  That code is concerned
with detecting changes to an already-identified type (that is, type
OID NNN has different details now than it did before).  It seemed to
me that Bryn's question was more about reacting to cases where a given
string of source code would resolve to a different type OID than it
did a moment ago.  We don't have a great story on that, I'll agree.
You can get into that sort of problem without anywhere near the amount
of complexity embodied in this example --- for instance, I'm pretty
sure we don't re-parse type references just because somebody else
executed an ALTER TYPE RENAME somewhere.

            regards, tom lane



pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: could not bind IPv4 address "127.0.0.1": Address already in use
Next
From: "David G. Johnston"
Date:
Subject: Re: Behavior of PL/pgSQL function following drop and re-create of a table that it uses