interval conversion bug - Mailing list pgsql-bugs

From Andrzej Wojtaszek
Subject interval conversion bug
Date
Msg-id s1a59d97.043@poczta.pro-futuro.com
Whole thread Raw
Responses Re: interval conversion bug
Re: interval conversion bug
List pgsql-bugs
Hi,
=20
I'm afraid that operator ::interval not working propertly=20
example:
=20
select 1
######################
select now() + (1||' day')::interval;
working propertly
######################

I have my function writen in plpgsql

function test(varchar) returns varchar;=20

select 2
######################
select my_name,
  test('12')
from table1
######################

returns 'aaa', '12 MONTH'=20

working  propertly

select 3
######################
select my_name=20
 now() +  (test('12'))::interval
from table1
######################

not working with error "cannot cast type character varying to iterval"



Facts=20
Database version 7.4.5
psql version 7.4.5
platform PIV
linux : Debian

Regards

Andrzej Wojtaszek

pgsql-bugs by date:

Previous
From: Mehul Doshi-A20614
Date:
Subject: Installation fails for postgresql-8.0.0-beta4 on WindowsXP SP1
Next
From: Tom Lane
Date:
Subject: Re: interval conversion bug