Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 3F4701337B43 for ; Thu, 28 Oct 2010 12:25:02 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 19965-01 for ; Thu, 28 Oct 2010 15:24:54 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from cdptpa-omtalb.mail.rr.com (cdptpa-omtalb.mail.rr.com [75.180.132.123]) by mail.postgresql.org (Postfix) with ESMTP id B9A541336DB6 for ; Thu, 28 Oct 2010 12:24:54 -0300 (ADT) X-Authority-Analysis: v=1.1 cv=3jtQBdTzPyV+fq4oCU/u8ZPrJJGN11HvhaDVxyWhycI= c=1 sm=0 a=qCTYjJJ2g1SgQhsHZAUATw==:17 a=fsnGr4-BwID0zViNlZYA:9 a=xFchFN0sp_K8kXPeUQtfYCFBwI4A:4 a=wPNLvfGTeEIA:10 a=2KQehPIfTyBWa4jaMEwA:9 a=k3mbO2Bd0jf-BfRMsVU93IgiFy8A:4 a=qCTYjJJ2g1SgQhsHZAUATw==:117 X-Cloudmark-Score: 0 X-Originating-IP: 98.27.48.207 Received: from [98.27.48.207] ([98.27.48.207:37209] helo=[192.168.10.104]) by cdptpa-oedge02.mail.rr.com (envelope-from ) (ecelerity 2.2.3.46 r()) with ESMTP id BE/C0-02631-3C599CC4; Thu, 28 Oct 2010 15:24:51 +0000 Message-ID: <4CC995C2.3000704@dunslane.net> Date: Thu, 28 Oct 2010 11:24:50 -0400 From: Andrew Dunstan User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.9) Gecko/20100907 Fedora/3.1.3-1.fc13 Lightning/1.0b3pre Thunderbird/3.1.3 MIME-Version: 1.0 To: PostgreSQL-development CC: Tim Bunce Subject: plperl arginfo Content-Type: multipart/alternative; boundary="------------090704040409090503010005" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.899 tagged_above=-5 required=5 tests=BAYES_00=-1.9, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001 X-Spam-Level: X-Archive-Number: 201010/1982 X-Sequence-Number: 173022 This is a multi-part message in MIME format. --------------090704040409090503010005 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit While we were discussing allowing generic record type arguments to plperl functions, Tom suggested that we should expose the type information about the record members to plperl. I think if we do that we should probably expand it somewhat to all arguments, so that for non-trigger functions, we'd have $_ARG_INFO while could look something like this: { names => ['arg1', undef, 'arg3' ] , # no name was supplied for arg2 modes => ['in', 'in', 'in' ], # do we support anything other than IN ? types => ['integer', 'text', { name => 'somecomposite', fields => [ 'field1', 'field2' ], types => ['date', 'numeric' ] } ], } Maybe we should also pass in type Oid info, too. I don't think this would be terribly difficult to do. thoughts? cheers andrew --------------090704040409090503010005 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit While we were discussing allowing generic record type arguments to plperl functions, Tom suggested that we should expose the type information about the record members to plperl. I think if we do that we should probably expand it somewhat to all arguments, so that for non-trigger functions, we'd have $_ARG_INFO while could look something like this:

{
    names => ['arg1', undef, 'arg3' ] , # no name was supplied for arg2
    modes => ['in', 'in', 'in' ], # do we support anything other than IN ?
    types => ['integer', 'text', { name => 'somecomposite', fields => [ 'field1', 'field2' ], types => ['date', 'numeric' ] } ],
}
Maybe we should also pass in type Oid info, too.

I don't think this would be terribly difficult to do.

thoughts?

cheers

andrew



       
--------------090704040409090503010005--