pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter_e@gmx.net>
To: Bhuvan A <bhuvansql@yahoo.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: combination of 'textcat' and 'interval' in 7.2.
Date: Wed, 20 Feb 2002 11:19:28 -0500 (EST)
Message-ID: <Pine.LNX.4.30.0202201118500.684-100000@peter.localdomain> (raw)
In-Reply-To: <Pine.LNX.4.20.0202201723150.8841-100000@Larry>

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




view thread (2+ messages)

Message-ID: <Pine.LNX.4.30.0202201118500.684-100000@peter.localdomain>
Permalink:  ../Pine.LNX.4.30.0202201118500.684-100000@peter.localdomain/
Also on:    postgresql.org/message-id/Pine.LNX.4.30.0202201118500.684-100000@peter.localdomain

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: peter_e@gmx.net, bhuvansql@yahoo.com
  Subject: Re: combination of 'textcat' and 'interval' in 7.2.
  In-Reply-To: <Pine.LNX.4.30.0202201118500.684-100000@peter.localdomain>
  References: <Pine.LNX.4.20.0202201723150.8841-100000@Larry> <Pine.LNX.4.30.0202201118500.684-100000@peter.localdomain>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox