On 04/07/2010 08:34 PM, Tom Lane wrote:
Andy Colson writes:
I have this stored proc that works in pg 8.4.
create or replace function roundts(ts timestamp) returns timestamp as $$
declare
tmp integer;
result timestamp;
offset interval;
OFFSET is a reserved word:
http://
Andy Colson writes:
> I have this stored proc that works in pg 8.4.
> create or replace function roundts(ts timestamp) returns timestamp as $$
> declare
> tmp integer;
> result timestamp;
> offset interval;
OFFSET is a reserved word:
http://developer.postgresql.org/pgdocs/postgr
I have this stored proc that works in pg 8.4.
create or replace function roundts(ts timestamp) returns timestamp as $$
declare
tmp integer;
result timestamp;
offset interval;
begin
tmp := extract(second from ts);
if tmp > 30 then
tmp := 60