Forum OpenACS Q&A: Re: Measuring Pl/Pgsql performance

Collapse
Posted by Jonathan Ellis on
hmm, you didn't have a transaction in there. My 7.2.4 install does show it returning the same value:

bf2=# create function foo() returns timestamptz as 'begin return current_timestamp; end;' language 'plpgsql';
CREATE
bf2=# begin transaction;
BEGIN
bf2=# select foo();
              foo
-------------------------------
 2003-06-18 22:48:07.619026-04
(1 row)

bf2=# select current_timestamp;
          timestamptz
-------------------------------
 2003-06-18 22:48:07.619026-04
(1 row)