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

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Bhuvan A <bhuvansql(at)yahoo(dot)com>
Cc: <pgsql-sql(at)postgresql(dot)org>
Subject: Re: combination of 'textcat' and 'interval' in 7.2.
Date: 2002-02-20 16:19:28
Message-ID: Pine.LNX.4.30.0202201118500.684-100000@peter.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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(at)gmx(dot)net

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message clayton cottingham 2002-02-20 17:28:51 Re: comparision chart
Previous Message Henry Holland 2002-02-20 13:21:16 Changing a column constraint?