Received: from localhost (unknown [200.46.204.184]) by developer.postgresql.org (Postfix) with ESMTP id A00832E0050; Thu, 10 Apr 2008 10:16:22 -0300 (ADT) Received: from developer.postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 00150-08; Thu, 10 Apr 2008 10:16:05 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from lists.commandprompt.com (host-159.commandprompt.net [207.173.203.159]) by developer.postgresql.org (Postfix) with ESMTP id 4A9752E005D; Thu, 10 Apr 2008 10:16:13 -0300 (ADT) Received: from perhan.alvh.no-ip.org (200-126-91-169.bk6-dsl.surnet.cl [200.126.91.169]) (authenticated bits=0) by lists.commandprompt.com (8.13.8/8.13.8) with ESMTP id m3ADGeii020054 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 10 Apr 2008 06:16:43 -0700 Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 479F747C57; Thu, 10 Apr 2008 09:16:02 -0400 (CLT) Date: Thu, 10 Apr 2008 09:16:02 -0400 From: Alvaro Herrera To: Martin Edlman Cc: pgsql-sql@postgresql.org, Pg Hackers , Pg Docs , andrew@dunslane.net Subject: Re: [SQL] pl/PgSQL, variable names in NEW Message-ID: <20080410131602.GF4697@alvh.no-ip.org> References: <47FA034B.7090201@fortech.cz> <162867790804070511y7266c911w370db97a78c3c519@mail.gmail.com> <47FB51C7.6090509@fortech.cz> <20080408132157.GF5290@alvh.no-ip.org> <47FDFB2E.3060503@fortech.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <47FDFB2E.3060503@fortech.cz> User-Agent: Mutt/1.5.17+20080114 (2008-01-14) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0 (lists.commandprompt.com [207.173.203.159]); Thu, 10 Apr 2008 06:16:44 -0700 (PDT) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200804/8 X-Sequence-Number: 4868 Martin Edlman wrote: > |> I don't want to rewrite whole trigger to plPerl as I would have to use > |> DBD-PgSPI. > | > | Huh? Certainly not -- there are functions in PL/Perl for this. See > | spi_exec_query in > | http://www.postgresql.org/docs/8.3/static/plperl-database.html > > Oh, I see. I have read the doc "...can be done via the function > spi_exec_query described below, or via an experimental module > DBD::PgSPI...", but missed the "OR" and thought that DBD::PgSPI is > mandatory. Yeah, that's a bit confusing. I don't know why we have a mention of DBD::PgSPI on the plperl manual at all. Is there anything it can do that can't be done with PL/Perl native calls? Question for plperl hackers: Should we remove the mention of DBD::PgSPI from the PL/Perl manual? -- Alvaro Herrera http://www.CommandPrompt.com/ PostgreSQL Replication, Consulting, Custom Development, 24x7 support