PGsql function timestamp issue

Поиск
Список
Период
Сортировка
От ng
Тема PGsql function timestamp issue
Дата
Msg-id CAAQKod115J-w7hiJ+rG8kn2FVqW51+ZVJsVpELNcU1Q4cw69dQ@mail.gmail.com
обсуждение исходный текст
Ответы Re: PGsql function timestamp issue  ("Jonathan S. Katz" <jonathan.katz@excoventures.com>)
Re: PGsql function timestamp issue  (Steve Crawford <scrawford@pinpointresearch.com>)
Re: PGsql function timestamp issue  (Vinayak Pokale <vinpokale@gmail.com>)
Список pgsql-sql

create or replace function dw.fx_nish()
returns text
  language plpgsql
  as
$$
declare
x timestamp with time zone;
y timestamp with time zone;
begin
x:= current_timestamp;
perform pg_sleep(5);
y:= current_timestamp;
if x=y then
return 'SAME';
else
return 'DIFFERENT';
end if;

end;
$$


select dw.fx_nish()
This give me 'SAME'

Any work around for this?

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

Предыдущее
От: Gary Stainburn
Дата:
Сообщение: Three way foreign keys
Следующее
От: "Jonathan S. Katz"
Дата:
Сообщение: Re: PGsql function timestamp issue