combination of 'textcat' and 'interval' in 7.2.
combination of 'textcat' and 'interval' in 7.2.
От:
Bhuvan A <bhuvansql@yahoo.com>
Дата:
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 interval(textcat (4, '' hours'')); But now, i do use (in 7.2) SELECT INTO 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.
От:
Peter Eisentraut <peter_e@gmx.net>
Дата:
Bhuvan A writes:
>
> In my plpgsql functions, i did use(in 7.1.2)
> SELECT INTO interval(textcat (4, '' hours''));
>
> But now, i do use (in 7.2)
> SELECT INTO 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