Re: interval conversion bug - Mailing list pgsql-bugs

From Stephan Szabo
Subject Re: interval conversion bug
Date
Msg-id 20041125082954.N43320@megazone.bigpanda.com
Whole thread Raw
In response to interval conversion bug  ("Andrzej Wojtaszek" <Andrzej.Wojtaszek@pro-futuro.com>)
List pgsql-bugs
On Thu, 25 Nov 2004, Andrzej Wojtaszek wrote:

> I'm afraid that operator ::interval not working propertly
> example:
>
> select 1
> ######################
> select now() + (1||' day')::interval;
> working propertly
> ######################

This is a text -> interval conversion

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

This is a varchar -> interval conversion.

It looks like 7.4 doesn't have the latter conversion and requires you to
go through text to make the conversion. 8.0 appears to add direct
conversions from varchar.

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: interval conversion bug
Next
From: "PostgreSQL Bugs List"
Date:
Subject: BUG #1329: Bug in IF-ELSEIF-ELSE construct