Re: is necessary to recheck cached data in fn_extra?

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: is necessary to recheck cached data in fn_extra?
Date: 2019-08-07 17:04:20
Message-ID: CAFj8pRAjwA-cKbitW96-qUnzsmEqzkeGyZM9snqitM_NXLkUpQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

st 7. 8. 2019 v 18:39 odesílatel Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> napsal:

> Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> writes:
> > st 7. 8. 2019 v 17:39 odesílatel Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> napsal:
> >> I wouldn't trust that. You don't really know what the lifespan of
> >> a fn_extra cache is.
>
> > fn_extra cache cannot be longer than query.
>
> There are fn_extra caches that are not tied to queries. Admittedly
> they're for special purposes like I/O functions and index support
> functions, and maybe you can assume that your function can't be
> used in such ways. I don't think it's a great programming model
> though.
>
> > And if I understand well, then
> > is not possible to change parameter types inside query?
>
> Most places dealing with composite types assume that the rowtype *could*
> change intraquery. I believe this was a live possibility in the past,
> though it might not be today. (The issue was inheritance queries, but
> I think we now force tuples from child tables to be converted to the
> parent rowtype. Whether that's 100% bulletproof is unclear.) If you're
> not dealing with composites then it's an okay assumption. I think.
>

ok, thank you for your reply.

Regards

Pavel

> regards, tom lane
>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Justin Pryzby 2019-08-07 17:30:13 crash 11.5~
Previous Message Alvaro Herrera 2019-08-07 16:58:10 Re: Grouping isolationtester tests in the schedule