Re: Casting numeric to text

From: "Ross J(dot) Reedstrom" <reedstrm(at)rice(dot)edu>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Cedar Cox <cedarc(at)visionforisrael(dot)com>, Hans-Jürgen Schönig <hs(at)cybertec(dot)at>, pgsql-sql(at)postgresql(dot)org
Subject: Re: Casting numeric to text
Date: 2001-04-09 16:26:51
Message-ID: 20010409112651.A29792@rice.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Mon, Apr 09, 2001 at 05:57:45PM +0200, Peter Eisentraut wrote:
> Cedar Cox writes:
>
> > When would one want to use cast()? What is the difference between cast
> > and :: ? After a quick look in the documentation I couldn't find
> > anything..
>
> cast() is SQL, :: is traditional Postgres. :: may go away in the distant
> future to make room for the SQL feature that is supposed to use ::. (It
> escapes me at the moment what that was.)

FYI, I can't find an occurance of '::' that's not part of '::=' in either
SQL1992.txt or the ansi-iso-[sql]-1999.txt files I've got.

But Peter's answer's still correct: CAST( <value> AS <type> ) is SQL
standard, '::' is not.

Ross

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Richard 2001-04-09 16:49:41 pg_dump and BLOB
Previous Message Peter Eisentraut 2001-04-09 16:01:01 Re: please help