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 9A691DA641 for ; Wed, 19 Oct 2005 19:44:56 -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 58530-02 for ; Wed, 19 Oct 2005 22:44:53 +0000 (GMT) Received: from hosting.commandprompt.com (128.commandprompt.com [207.173.200.128]) by svr1.postgresql.org (Postfix) with ESMTP id 05C62D8EA5 for ; Wed, 19 Oct 2005 19:44:54 -0300 (ADT) Received: from [192.168.1.100] (clbb-248.saw.net [64.146.135.248]) (authenticated bits=0) by hosting.commandprompt.com (8.13.4/8.13.4) with ESMTP id j9JMfl49030818; Wed, 19 Oct 2005 15:41:52 -0700 Message-ID: <4356CC70.5050508@commandprompt.com> Date: Wed, 19 Oct 2005 15:45:04 -0700 From: "Joshua D. Drake" User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051013) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Kelly Burkhart Cc: pgsql-interfaces@postgresql.org Subject: Re: pl/pythonu - return values References: <1129748586.9370.44.camel@krb06.tradebot.com> In-Reply-To: <1129748586.9370.44.camel@krb06.tradebot.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender succeded SMTP AUTH authentication, not delayed by milter-greylist-1.6 (hosting.commandprompt.com [192.168.1.101]); Wed, 19 Oct 2005 15:41:52 -0700 (PDT) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.02 required=5 tests=[AWL=0.020] X-Spam-Level: X-Archive-Number: 200510/18 X-Sequence-Number: 5780 Kelly Burkhart wrote: >Can pl/pythonu procedures return anything other than a string? > >I have some python code which communicates to another process and can >either return sensible results or some kind of error. I was hoping to >return something like: > >create type rval_t as (status integer, status_txt text, result text); > > Well you could have it return the set using a setof function. >Is something like this possible? > > >---------------------------(end of broadcast)--------------------------- >TIP 9: In versions below 8.0, the planner will ignore your desire to > choose an index scan if your joining column's datatypes do not > match > > -- The PostgreSQL Company - Command Prompt, Inc. 1.503.667.4564 PostgreSQL Replication, Consulting, Custom Development, 24x7 support Managed Services, Shared and Dedicated Hosting Co-Authors: plPHP, plPerlNG - http://www.commandprompt.com/