Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 8C40065016C for ; Wed, 9 Jul 2008 15:58:42 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 84276-03 for ; Wed, 9 Jul 2008 15:58:36 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from fugue.toroid.org (fugue.toroid.org [85.10.196.113]) by postgresql.org (Postfix) with ESMTP id 19450650152 for ; Wed, 9 Jul 2008 15:58:37 -0300 (ADT) Received: from penne.toroid.org (penne-vpn [10.8.0.6]) by fugue.toroid.org (Postfix) with ESMTP id 5331855854B; Wed, 9 Jul 2008 20:58:34 +0200 (CEST) Received: by penne.toroid.org (Postfix, from userid 1000) id E5A20ADC364; Thu, 10 Jul 2008 00:28:37 +0530 (IST) Date: Thu, 10 Jul 2008 00:28:37 +0530 From: Abhijit Menon-Sen To: Alvaro Herrera Cc: Jaime Casanova , pgsql-hackers@postgresql.org Subject: Re: Extending grant insert on tables to sequences Message-ID: <20080709185837.GA27406@toroid.org> References: <20080708133244.GB4095@alvh.no-ip.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080708133244.GB4095@alvh.no-ip.org> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200807/485 X-Sequence-Number: 120745 At 2008-07-08 09:32:44 -0400, alvherre@commandprompt.com wrote: > > > > The idea of this patch is to avoid the need to make explicit > > > grants on sequences owned by tables. [...] > > I had a look at this patch and it looks good. The only thing that's > not clear to me is whether we have agreed we want this to be the > default behavior? For what it's worth, I quite like the idea. (I looked at the patch, and it looks good to me too.) > Wouldn't it be clearer to build a list with all the sequences owned by > the tables in istmt.objects, and then call ExecGrantStmt_oids() a > single time with the big list? i.e., to hoist most of the istmt_seq initialisation out of the loop, right? Yes, that makes sense. -- ams