Cast possible only throught a function

From: "Mendola Gaetano" <mendola(at)bigfoot(dot)com>
To: <pgsql-bugs(at)postgresql(dot)org>
Subject: Cast possible only throught a function
Date: 2003-07-26 10:00:24
Message-ID: 027401c3535c$bc14c400$10d4a8c0@mm.eutelsat.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2003-07-26 14:02:55 Re: libpq.a must be ranlibed after installation
Previous Message Kenji Sugita 2003-07-26 09:58:54 libpq.a must be ranlibed after installation