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 2FD32D838E for ; Sun, 20 Nov 2005 16:12:01 -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 23052-10-5 for ; Sun, 20 Nov 2005 20:12:00 +0000 (GMT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from tigger.fuhr.org (tigger.fuhr.org [63.214.45.158]) by svr1.postgresql.org (Postfix) with ESMTP id DB77DD85B9 for ; Sun, 20 Nov 2005 16:11:57 -0400 (AST) Received: from winnie.fuhr.org (winnie.fuhr.org [10.1.0.1]) by tigger.fuhr.org (8.13.3/8.13.3) with ESMTP id jAKKBtPr053843 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 20 Nov 2005 13:11:57 -0700 (MST) (envelope-from mfuhr@winnie.fuhr.org) Received: from winnie.fuhr.org (localhost [127.0.0.1]) by winnie.fuhr.org (8.13.4/8.13.4) with ESMTP id jAKKBtsR048616; Sun, 20 Nov 2005 13:11:55 -0700 (MST) (envelope-from mfuhr@winnie.fuhr.org) Received: (from mfuhr@localhost) by winnie.fuhr.org (8.13.4/8.13.4/Submit) id jAKKBsdD048615; Sun, 20 Nov 2005 13:11:54 -0700 (MST) (envelope-from mfuhr) Date: Sun, 20 Nov 2005 13:11:54 -0700 From: Michael Fuhr To: CSN Cc: pgsql-interfaces@postgresql.org Subject: Re: ruby/postgres - getting assoc array of rows? Message-ID: <20051120201154.GA48549@winnie.fuhr.org> References: <20051120155613.GB38669@winnie.fuhr.org> <20051120193620.68688.qmail@web52908.mail.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20051120193620.68688.qmail@web52908.mail.yahoo.com> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0 required=5 tests=[AWL=0.000] X-Spam-Score: 0 X-Spam-Level: X-Archive-Number: 200511/57 X-Sequence-Number: 5853 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