Hi,
I'm afraid that operator ::interval not working propertly
example:
select 1
######################
select now() + (1||' day')::interval;
working propertly
######################
I have my function writen in plpgsql
function test(varchar) returns varchar;
select 2
######################
select my_name,
test('12')
from table1
######################
returns 'aaa', '12 MONTH'
working propertly
select 3
######################
select my_name
now() + (test('12'))::interval
from table1
######################
not working with error "cannot cast type character varying to iterval"
Facts
Database version 7.4.5
psql version 7.4.5
platform PIV
linux : Debian
Regards
Andrzej Wojtaszek
---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match