Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id A21B26336F9 for ; Mon, 11 Jan 2010 22:32:11 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 61437-05 for ; Tue, 12 Jan 2010 02:31:52 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-fx0-f227.google.com (mail-fx0-f227.google.com [209.85.220.227]) by mail.postgresql.org (Postfix) with ESMTP id BB04B6336DC for ; Mon, 11 Jan 2010 22:32:00 -0400 (AST) Received: by fxm27 with SMTP id 27so7438177fxm.3 for ; Mon, 11 Jan 2010 18:31:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=lGz1Fuem7OFaJvHK/LqG7X65AxMVRImA9PmiikHaLX8=; b=UFmPzoZkp0FYNPnYuj41NkA1K+FJ9dNiMN/kPE08ToAGfwlAl8Ow4XyubOGYbutWuL feOKzxkfCxhSJU4xDtiiYWoINM1gcKInUA1rtbIKFSzoz4Qh6oVNMLpxS9/oJS+rSc7F 4BwD6QTp2cabyCeNDFBl29dY9vBIiPXEjPrNg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=RFq8u3652I22Qa0t8Vj5SlYXpNrR0B4/JhT8YyPNBHteMaks+7le/dim47+dq7DYb5 FXAChWe42JeRu79vpnBfblyaGj3ThNLX5/9AygMEu7T/2YmHRTpHXWyKaqLbPZHsPpv+ YNWVN3EXg1QJblXDB7aK7kNKi8YFBqG8otEPs= MIME-Version: 1.0 Received: by 10.239.187.197 with SMTP id m5mr618873hbh.172.1263263518461; Mon, 11 Jan 2010 18:31:58 -0800 (PST) In-Reply-To: <201001111641.o0BGf7cw063967@wwwmaster.postgresql.org> References: <201001111641.o0BGf7cw063967@wwwmaster.postgresql.org> Date: Mon, 11 Jan 2010 21:31:57 -0500 Message-ID: <603c8f071001111831j5b05b57cs108d2792c390e26@mail.gmail.com> Subject: Re: BUG #5272: PL/Python SELECT: return composite fields as dict, not str From: Robert Haas To: Steve White Cc: pgsql-bugs@postgresql.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.461 tagged_above=-10 required=5 tests=AWL=0.138, BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 201001/96 X-Sequence-Number: 25600 On Mon, Jan 11, 2010 at 11:41 AM, Steve White wrote: > I see nothing in the documentation about this > =A0 =A0 =A0 =A0http://www.postgresql.org/docs/8.4/static/plpython.html > It only talks about passing composite types into and out of functions. > > This is an unpleasant discovery for those working to a deadline. =A0Perha= ps a > "limitations" section for the doc would be in order. =A0(You could also l= ist > the limitations of PL/Python regarding returning RECORD types.) Maybe you could suggest some text, perhaps in the form of a context diff against the current sgml files? > But the best thing to do would be to fix it. Doubtless. Of course it will depend on whether anyone finds enough round tuits. Peter Eisentraut made some improvements to PL/python array handling which will be in the next major release, but I am not aware of anyone working on record types. This is an all-volunteer effort, so people tend to scratch their own itches. > For backward compatibility, you might implement a switch that turns on th= e > hierarchical interpretation of fields, and leave the current behaviour as > the default. I suspect we wouldn't bother with that. ...Robert