Cast possible only throught a function - Mailing list pgsql-bugs

From Mendola Gaetano
Subject Cast possible only throught a function
Date
Msg-id 027401c3535c$bc14c400$10d4a8c0@mm.eutelsat.org
Whole thread Raw
Responses Re: Cast possible only throught a function
List pgsql-bugs
Hi all,
running on Postgres 7.3.3
I seen that cast a integer to an intervall is not permitted

select 0::interval;    <- give error

but

select 0::text::interval;   <- works fine

but I notice that the following function return correctly
doing the integer -> interval cast in one "shot":

create or replace function foo()
returns interval as '
declare
begin
 return 0;
end;
' language 'plpgsql';



this implicit cast could not be source of issue ?


Gaetano

pgsql-bugs by date:

Previous
From: Kenji Sugita
Date:
Subject: libpq.a must be ranlibed after installation
Next
From: Tom Lane
Date:
Subject: Re: libpq.a must be ranlibed after installation