Re: SetQuerySnapshot, once again

From: "Hiroshi Inoue" <Inoue(at)tpf(dot)co(dot)jp>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: SetQuerySnapshot, once again
Date: 2002-06-18 16:45:41
Message-ID: EKEJJICOHDIEMGPNIFIJEEHLIBAA.Inoue@tpf.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> -----Original Message-----
> From: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us]
>
> Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp> writes:
> > Tom Lane wrote:
> >> Sorry, I don't understand ...
>
> > Let t be a table which is defined as
> > create table t (id serial primary key, dt text);
> > Then is the following function *stable* ?
> > create function f1(int4) returns text as
> > '
> > declare
> > txt text;
> > begin
> > select dt into txt from t where id = $1;
> > return txt;
> > end
> > ' language plpgsql;
>
> I'm not sure exactly what you mean by "stable" here.

Wasn't it you who defined *stable* as
Cachable within a single command: given fixed input values, the
result will not change if the function were to be repeatedly evaluated
within a single SQL command; but the result could change over time.
?

> And I'm even less sure whether you are arguing for or
> against adding SetQuerySnapshot calls into plpgsql...

I already mentioned an opinion in 2001/09/08.
Both the command counters and the snapshots in a
function should advance except the leading SELECT
statements.

regards,
Hiroshi Inoue

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2002-06-18 16:55:32 Re: KSQO parameter
Previous Message Serge Adda 2002-06-18 16:42:33 Re: Roadmap for a Win32 port