Re: SetQuerySnapshot, once again

Поиск
Список
Период
Сортировка
От Hiroshi Inoue
Тема Re: SetQuerySnapshot, once again
Дата
Msg-id EKEJJICOHDIEMGPNIFIJEEHLIBAA.Inoue@tpf.co.jp
обсуждение исходный текст
Ответ на Re: SetQuerySnapshot, once again  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: SetQuerySnapshot, once again
Список pgsql-hackers
> -----Original Message-----
> From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
> 
> Hiroshi Inoue <Inoue@tpf.co.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
changeif 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
exceptthe leading SELECT statements.
 

regards,
Hiroshi Inoue


В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Josh Berkus"
Дата:
Сообщение: Re: [SQL] Request for builtin function: Double_quote
Следующее
От: Serge Adda
Дата:
Сообщение: Re: Roadmap for a Win32 port