Re: Postgresql9.6 type cache invalidation issue - different behave of psql and pg regress

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Postgresql9.6 type cache invalidation issue - different behave of psql and pg regress
Date: 2018-04-20 13:44:28
Message-ID: 20686.1524231868@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> writes:
> In interactive mode, the build_row_from_class has unrefreshed metadata. But
> why this behave I see only in psql and not in my regress tests?

The short answer is that no plpgsql version before commit 4b93f5799
will have nice behavior for cases where you change a referenced composite
type between calls. Why that's translating to the particular behavior
you're seeing isn't clear, considering you showed only one case in
detail; but I imagine it's because a parse of the plpgsql function
happens before the ALTER TABLE in one case and not the other.
Perhaps you have different settings of check_function_bodies,
for instance.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Matthias Kurz 2018-04-20 13:55:49 Add read-only param to set_config(...) / SET that effects (at least) customized runtime options
Previous Message Amit Kapila 2018-04-20 13:11:00 Re: Toast issues with OldestXmin going backwards