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-17 23:59:28 |
Message-ID: | 3D0E77E0.877B9F56@tpf.co.jp |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Tom Lane wrote:
>
> Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp> writes:
> > I have a question. Could the functions which contain no
> > queries other than SELECT be stable(returns the definite
> > result for a query) with it ?
>
> 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;
If SetQuerySnapshot is called for the above *select*,
the result isn't determined by the snapshot of the
function.
regards,
Hiroshi Inoue
http://w2422.nsk.ne.jp/~inoue/
From | Date | Subject | |
---|---|---|---|
Next Message | Josh Berkus | 2002-06-18 00:10:02 | Re: Default privileges for new databases (was Re: Can't import large objects in most recent cvs) |
Previous Message | Bruce Momjian | 2002-06-17 21:44:46 | Re: [Fwd: contrib/showguc (was Re: [HACKERS] revised sample |