Thread: combination of 'textcat' and 'interval' in 7.2.

combination of 'textcat' and 'interval' in 7.2.

From
Bhuvan A
Date:
hi,

just a day back, i did upgrade to 7.2(from 7.1.2).

In my plpgsql functions, i did use(in 7.1.2) 
SELECT INTO <variable> interval(textcat (4, '' hours''));

But now, i do use (in 7.2)
SELECT INTO <variable> cast (textcat (4, '' hours'') as interval);

and it works.

is this a permanent fix? will it work in earlier and future releases?
Would like to get some links on migration of plpgsql functions from
7.1.x to 7.2?

Regards,
Bhuvaneswar.



Re: combination of 'textcat' and 'interval' in 7.2.

From
Peter Eisentraut
Date:
Bhuvan A writes:

>
> In my plpgsql functions, i did use(in 7.1.2)
> SELECT INTO <variable> interval(textcat (4, '' hours''));
>
> But now, i do use (in 7.2)
> SELECT INTO <variable> cast (textcat (4, '' hours'') as interval);
>
> and it works.
>
> is this a permanent fix? will it work in earlier and future releases?

Standard syntax is

cast('4' || ' hours' as interval)

-- 
Peter Eisentraut   peter_e@gmx.net