Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 9796E9FB3F2 for ; Thu, 26 Jul 2007 12:01:11 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 22872-08 for ; Thu, 26 Jul 2007 12:00:56 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from megazone.bigpanda.com (megazone.bigpanda.com [64.147.171.210]) by postgresql.org (Postfix) with ESMTP id 259B99FB2DC for ; Thu, 26 Jul 2007 12:01:04 -0300 (ADT) Received: by megazone.bigpanda.com (Postfix, from userid 1001) id 0019835494; Thu, 26 Jul 2007 08:00:59 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by megazone.bigpanda.com (Postfix) with ESMTP id F2C1A35482; Thu, 26 Jul 2007 08:00:59 -0700 (PDT) Date: Thu, 26 Jul 2007 08:00:59 -0700 (PDT) From: Stephan Szabo To: Bryce Nesbitt Cc: pgsql-sql@postgresql.org Subject: Re: How to cast, if type has spaces in the name In-Reply-To: <46A84E35.7000609@obviously.com> Message-ID: <20070726075708.M12817@megazone.bigpanda.com> References: <46A84E35.7000609@obviously.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200707/156 X-Sequence-Number: 28891 On Thu, 26 Jul 2007, Bryce Nesbitt wrote: > How do I specify a cast, if the type name has spaces? foo::integer is > easy, > but foo::'timestamp without time zone' is more murky. foo::timestamp without time zone should work (no quotes). Another alternative if you don't like the way that looks is to use the SQL cast syntax, CAST(foo AS timestamp without time zone).