X-Original-To: pgsql-interfaces-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id DEEAAD8321 for ; Sun, 20 Nov 2005 16:28:38 -0400 (AST) 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 24893-09 for ; Sun, 20 Nov 2005 20:28:39 +0000 (GMT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from web52915.mail.yahoo.com (web52915.mail.yahoo.com [206.190.49.25]) by svr1.postgresql.org (Postfix) with SMTP id C87DDD8313 for ; Sun, 20 Nov 2005 16:28:35 -0400 (AST) Received: (qmail 53567 invoked by uid 60001); 20 Nov 2005 20:28:33 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=UouVH9H6UaDuLytE5tHZyX+FHJTu8K15x2kF2HrxPKkvfVNqX2eU9qyIxLutRxUL2i1oJHRxptFrXcjRD5eEDiMB3NEMaeZqcntf5cFasGtdllZJ2BdK/gOPR/kogpZzOiDRePiJ3Yfahur/DHL28ZVnPRvMBCpAg43aaMiPF7Q= ; Message-ID: <20051120202833.53565.qmail@web52915.mail.yahoo.com> Received: from [24.8.120.181] by web52915.mail.yahoo.com via HTTP; Sun, 20 Nov 2005 12:28:32 PST Date: Sun, 20 Nov 2005 12:28:32 -0800 (PST) From: CSN Subject: Re: ruby/postgres - getting assoc array of rows? To: Michael Fuhr Cc: pgsql-interfaces@postgresql.org In-Reply-To: <20051120201154.GA48549@winnie.fuhr.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.536 required=5 tests=[AWL=-0.160, DNS_FROM_RFC_ABUSE=0.479, FROM_HAS_ULINE_NUMS=0.217] X-Spam-Score: 0.536 X-Spam-Level: X-Archive-Number: 200511/58 X-Sequence-Number: 5854 Ah.. I installed the snapshot manually and the script works fine now. They should update the gem version - Jan. 2003 is quite a while ago. Does it matter if the postgres library is installed via 'gem' or not? Thanks again for your help! csn --- Michael Fuhr wrote: > On Sun, Nov 20, 2005 at 11:36:20AM -0800, CSN wrote: > > --- Michael Fuhr wrote: > > > What versions of Ruby and ruby-postgres are you using? Did you use > > > exactly the code I posted or did you do something different? The > > > only way to get a PGrow object (other than building it yourself) > > > is from PGresult#each or some method that calls it, so this won't > > > work: > > > > I'm using Ruby 1.8 and postgres 0.7.1 (installed via gem). > > That explains it. I've been using the ruby-postgres-20050412 > snapshot; I just grabbed the 0.7.1 source code and it doesn't have > the PGrow type, nor the PGconn.new syntax that I've been using. > > I see that a 20051119 snapshot is now available: > > http://ruby.scripting.ca/postgres/ > > -- > Michael Fuhr > __________________________________ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com