Problem to add a delay to a date

From: Thierry Missimilly <THIERRY(dot)MISSIMILLY(at)BULL(dot)NET>
To: pgsql-general(at)postgresql(dot)org
Subject: Problem to add a delay to a date
Date: 2003-04-03 11:28:54
Message-ID: 3E8C1AF6.59D2D1E7@BULL.NET
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

I try to create a function in charge of adding a delay to a timestamp.
Here are the stange results on Postgres 7.3.1.
working with psql :

test=# select now() + '60' as time;
time
--------------------------------------
2003-03-24 16:04:53.8680551+01
(1 row)

and when i want to create a function :

test=# create function addtime() returns timestamp as 'select now() +
''60'' ' language 'sql';
ERROR: return type mismatch in function: declared to return timestamp
without time zone, returns timestamp with time zone

Where is the error .

Thierry

Attachment Content-Type Size
THIERRY.MISSIMILLY.vcf text/x-vcard 327 bytes

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Peter Haworth 2003-04-03 11:36:07 Re: this date format thing.
Previous Message Ulli Mueckstein 2003-04-03 11:01:16 call analyze from stored procedure in C