Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 9871D6347C7 for ; Sat, 15 Aug 2009 10:19:30 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 92119-05 for ; Sat, 15 Aug 2009 13:19:25 +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 A2C196342CE for ; Sat, 15 Aug 2009 10:19:25 -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 09:13:53 -0400 id 00083BF2.4A86B492.00000BF1 Message-ID: <4A86B5D5.6060807@dunslane.net> Date: Sat, 15 Aug 2009 09:19:17 -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: Pavel Stehule CC: 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> In-Reply-To: <162867790908150434j7aef36ecm202e81c4bb4740fa@mail.gmail.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=BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 200908/1190 X-Sequence-Number: 143833 Pavel Stehule wrote: > why we need DO statement? Why not just $$ $$. Only string literal > cannot be statement too, so DO is unnecessary. > > it can look like: > > $$ > FOR r IN SELECT .... > END LOOP; > $$; > > ??? > > Well, it's arguably somewhat un-SQL-ish. Every command in SQL is introduced by a keyword verb. 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? cheers andrew