Received: from wallace.ece.rice.edu (wallace.ece.rice.edu [128.42.12.154]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f39GR4886576 for ; Mon, 9 Apr 2001 12:27:04 -0400 (EDT) (envelope-from reedstrm@rice.edu) Received: by rice.edu via sendmail from stdin id (Debian Smail3.2.0.102) for pgsql-sql@postgresql.org; Mon, 9 Apr 2001 11:26:51 -0500 (CDT) Date: Mon, 9 Apr 2001 11:26:51 -0500 From: "Ross J. Reedstrom" To: Peter Eisentraut Cc: Cedar Cox , =?iso-8859-1?Q?Hans-J=FCrgen_Sch=F6nig?= , pgsql-sql@postgresql.org Subject: Re: Casting numeric to text Message-ID: <20010409112651.A29792@rice.edu> Mail-Followup-To: Peter Eisentraut , Cedar Cox , =?iso-8859-1?Q?Hans-J=FCrgen_Sch=F6nig?= , pgsql-sql@postgresql.org References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii User-Agent: Mutt/1.0i In-Reply-To: ; from peter_e@gmx.net on Mon, Apr 09, 2001 at 05:57:45PM +0200 X-Archive-Number: 200104/121 X-Sequence-Number: 2468 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( AS ) is SQL standard, '::' is not. Ross