X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id C6A30529EE for ; Tue, 16 Aug 2005 21:03:09 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 47861-05 for ; Wed, 17 Aug 2005 00:02:42 +0000 (GMT) Received: from davinci.ethosmedia.com (server227.ethosmedia.com [209.128.84.227]) by svr1.postgresql.org (Postfix) with ESMTP id 1914B528B4 for ; Tue, 16 Aug 2005 21:02:41 -0300 (ADT) X-EthosMedia-Virus-Scanned: no infections found Received: from [67.103.45.218] (account josh@agliodbs.com HELO [10.0.0.38]) by davinci.ethosmedia.com (CommuniGate Pro SMTP 4.1.8) with ESMTP id 7736155; Tue, 16 Aug 2005 17:05:01 -0700 From: Josh Berkus Reply-To: josh@agliodbs.com Organization: Aglio Database Solutions To: pgsql-sql@postgresql.org Subject: Re: converting varchar to integer Date: Tue, 16 Aug 2005 17:05:49 -0700 User-Agent: KMail/1.8 Cc: tv@fuzzy.cz References: <1124235288.43027818cb6e3@email.gigaweb.cz> In-Reply-To: <1124235288.43027818cb6e3@email.gigaweb.cz> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200508161705.50261.josh@agliodbs.com> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0 required=5 tests=[AWL=0.000] X-Spam-Level: X-Archive-Number: 200508/119 X-Sequence-Number: 22347 Tomas, > I've written two on my own (see the functions below), > but maybe there's something faster? Nope. 'cept I'd combine those two functions into a single function that returns NULL if the value isn't an integer. -- --Josh Josh Berkus Aglio Database Solutions San Francisco