Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id C55F6632395 for ; Sat, 15 Aug 2009 19:37:16 -0300 (ADT) 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 63905-03 for ; Sat, 15 Aug 2009 22:37:00 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from alexis.jtlnet.com (alexis.jtlnet.com [69.36.9.81]) by mail.postgresql.org (Postfix) with ESMTP id 209FA635E17 for ; Sat, 15 Aug 2009 19:37:05 -0300 (ADT) Received: from [192.168.10.103] (cpe-075-177-154-027.nc.res.rr.com [::ffff:75.177.154.27]) (TLS: TLSv1/SSLv3,256bits,AES256-SHA) by alexis.jtlnet.com with esmtp; Sat, 15 Aug 2009 18:36:16 -0400 id 00083C23.4A873860.00007629 Message-ID: <4A873886.5020209@dunslane.net> Date: Sat, 15 Aug 2009 18:36:54 -0400 From: Andrew Dunstan User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.8.0.12) Gecko/20071019 Fedora/1.0.9-3.fc6 pango-text SeaMonkey/1.0.9 MIME-Version: 1.0 To: Josh Berkus CC: Pavel Stehule , Dimitri Fontaine , Kevin Grittner , Peter Eisentraut , pgsql-hackers@postgresql.org, Nikhil Sontakke , Robert Haas , Petr Jelinek , Stephen Frost , Tom Lane Subject: Re: GRANT ON ALL IN schema References: <4A37BF63.50008@pjmodos.net> <603c8f070908050951s3e5df452se4c610f01b80bb7d@mail.gmail.com> <21246.1249491592@sss.pgh.pa.us> <200908101042.35024.peter_e@gmx.net> <4A7FE7F902000025000296E3@gw.wicourts.gov> <4A803A89.9020509@dunslane.net> <2CCE9C1D-919D-45D5-BFC2-C7723C45064E@hi-media.com> <162867790908150434j7aef36ecm202e81c4bb4740fa@mail.gmail.com> <4A86B5D5.6060807@dunslane.net> <4A871F46.1040002@agliodbs.com> In-Reply-To: <4A871F46.1040002@agliodbs.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.599 tagged_above=-10 required=5 tests=AWL=0.000, BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 200908/1202 X-Sequence-Number: 143845 Josh Berkus wrote: >> I'm also not sure I want to be trying to execute any arbitrary string >> that accidentally gets placed there because someone forgot to put a >> keyword or accidentally deleted it. >> >> But I'm not too dogmatic on the subject. What do others think? >> > > Given that $$ is also used to quote non-procedural strings, I don't like > the idea that psql would be trying to execute any string I gave it after > forgetting "select". If nothing else, that would lead to confusing and > misleading error messages. > > Ideally, we'd be able to execute *any* PL that way by setting a shell > variable: > > \pl plperl > DO $f$ foreach ( @_ ) { ... > > > I think you have misunderstood. I am not talking at all about doing this in psql. It would be built into the server's SQL so you could use any client, and the default language would be a GUC as Tom suggested upstream. cheers andrew