X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 69FFA9FA4DE for ; Fri, 5 May 2006 18:52:36 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 21153-01 for ; Fri, 5 May 2006 18:52:30 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from wr-out-0506.google.com (wr-out-0506.google.com [64.233.184.234]) by postgresql.org (Postfix) with ESMTP id 58C389FA3A3 for ; Fri, 5 May 2006 18:52:30 -0300 (ADT) Received: by wr-out-0506.google.com with SMTP id i30so655663wra for ; Fri, 05 May 2006 14:52:29 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:from:to:subject:date:user-agent:references:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:message-id:x-virus-scanned; b=QF7RfxmIl3+OENofP3YZ18RyywJISdlycL9KzwepMfcE/gqProeWIUTzBhJFUE45/CW6vfOgkdkKrLcal3Jxp4TiczNhOYbanawMuUKOsGPwqBf/ZsbSIAwPLrb/v8d2SL04u9zFHnQLMH75f74iPzIsehzwGBC9/wDS3ETtbQ4= Received: by 10.54.60.15 with SMTP id i15mr1464275wra; Fri, 05 May 2006 14:52:27 -0700 (PDT) Received: from strongwill.g2ctech ( [200.139.118.6]) by mx.gmail.com with ESMTP id 26sm1002116wra.2006.05.05.14.52.25; Fri, 05 May 2006 14:52:26 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by strongwill.g2ctech (Postfix) with ESMTP id DCC4662A9C for ; Fri, 5 May 2006 18:52:22 -0300 (BRT) Received: from strongwill.g2ctech ([127.0.0.1]) by localhost (strongwill [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 04794-02-5 for ; Fri, 5 May 2006 18:52:22 -0300 (BRT) Received: from jupiter.g2ctech (unknown [10.0.0.240]) by strongwill.g2ctech (Postfix) with ESMTP id BCFF522C06 for ; Fri, 5 May 2006 18:52:22 -0300 (BRT) Received: from localhost (localhost [IPv6:::1]) by jupiter.g2ctech (Postfix) with ESMTP id E5547CE32E for ; Fri, 5 May 2006 18:52:19 -0300 (BRT) From: Jorge Godoy To: pgsql-sql@postgresql.org Subject: Re: Returning String as Integer Date: Fri, 5 May 2006 18:52:19 -0300 User-Agent: KMail/1.9.1 References: <18AE59788A3FC640A367E5652E664D8002093F0C@xmb-sjc-237.amer.cisco.com> In-Reply-To: <18AE59788A3FC640A367E5652E664D8002093F0C@xmb-sjc-237.amer.cisco.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200605051852.19596.jgodoy@gmail.com> X-Virus-Scanned: amavisd-new at g2ctech.com X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200605/59 X-Sequence-Number: 25090 Em Sexta 05 Maio 2006 18:37, Kashmira Patel (kupatel) escreveu: > Hi all, > I have a table with a column of type 'text'. It mainly contains > numbers. Is there any way to select a value from this column and return > it as an integer? testing=# select '123'::integer; int4 ------ 123 (1 registro) testing=# -- Jorge Godoy