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

Collapse
Posted by Don Baccus on
current_timestamp does NOT return the same value each time and it is the documented and prefered way to do this:

create function foo() returns timestamptz as 'begin return current_timestamp; end;' language 'plpgsql';
CREATE FUNCTION
openacs46=# select foo();
              foo
-------------------------------
2003-06-19 00:32:23.515002+00
(1 row)

openacs46=# select foo();
              foo
-------------------------------
2003-06-19 00:32:25.632249+00
(1 row)

openacs46=# select foo();
              foo
-------------------------------
2003-06-19 00:32:31.894221+00
(1 row)