pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ross J. Reedstrom <reedstrm@rice.edu>
To: Peter Eisentraut <peter_e@gmx.net>
Cc: Cedar Cox <cedarc@visionforisrael.com>
Cc: Hans-Jürgen Schönig <hs@cybertec.at>
Cc: pgsql-sql@postgresql.org
Subject: Re: Casting numeric to text
Date: Mon, 9 Apr 2001 11:26:51 -0500
Message-ID: <20010409112651.A29792@rice.edu> (raw)
In-Reply-To: <Pine.LNX.4.30.0104091756410.1255-100000@peter.localdomain>
References: <Pine.LNX.4.21.0104090218440.7109-100000@nanu.visionforisrael.com>
	<Pine.LNX.4.30.0104091756410.1255-100000@peter.localdomain>

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



view thread (7+ messages)  latest in thread

Message-ID: <20010409112651.A29792@rice.edu>
Permalink:  ../20010409112651.A29792@rice.edu/
Also on:    postgresql.org/message-id/20010409112651.A29792@rice.edu

 · 

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: reedstrm@rice.edu, peter_e@gmx.net, cedarc@visionforisrael.com, hs@cybertec.at
  Subject: Re: Casting numeric to text
  In-Reply-To: <20010409112651.A29792@rice.edu>
  References: <Pine.LNX.4.21.0104090218440.7109-100000@nanu.visionforisrael.com> <Pine.LNX.4.30.0104091756410.1255-100000@peter.localdomain> <20010409112651.A29792@rice.edu>

* 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