Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id E2BCA1337B5B for ; Wed, 22 Sep 2010 10:09:10 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 95663-10 for ; Wed, 22 Sep 2010 13:09:04 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail.gmx.net (mailout-de.gmx.net [213.165.64.23]) by mail.postgresql.org (Postfix) with SMTP id EFE771337B52 for ; Wed, 22 Sep 2010 10:09:02 -0300 (ADT) Received: (qmail invoked by alias); 22 Sep 2010 13:09:02 -0000 Received: from a88-115-218-165.elisa-laajakaista.fi (EHLO [10.0.0.101]) [88.115.218.165] by mail.gmx.net (mp009) with SMTP; 22 Sep 2010 15:09:02 +0200 X-Authenticated: #495269 X-Provags-ID: V01U2FsdGVkX18OXw4aJeMO33QGfWEdLIH8f/P2lwc4ksMtYMz+6u Ok241/Prvy1KWU Subject: Re: BUG #5662: Incomplete view From: Peter Eisentraut To: Tom Lane Cc: saera87@hotmail.com, pgsql-bugs@postgresql.org In-Reply-To: <6630.1284920898@sss.pgh.pa.us> References: <201009190941.o8J9fT6H048689@wwwmaster.postgresql.org> <1284918458.20510.0.camel@vanquo.pezone.net> <6630.1284920898@sss.pgh.pa.us> Content-Type: text/plain; charset="UTF-8" Date: Wed, 22 Sep 2010 16:09:00 +0300 Message-ID: <1285160940.15691.46.camel@vanquo.pezone.net> Mime-Version: 1.0 X-Mailer: Evolution 2.30.2 Content-Transfer-Encoding: 8bit X-Y-GMX-Trusted: 0 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-5 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201009/192 X-Sequence-Number: 28156 On sön, 2010-09-19 at 14:28 -0400, Tom Lane wrote: > What about inventing a function to extract a sequence's parameters? > Perhaps something like > > pg_sequence_parameter(seq regclass, colname text) returns > bigint > > which would do an appropriate permissions check and then fetch the > named column. (This could actually be implemented in a line or two in > plpgsql, but I think we want it in C because information_schema > shouldn't depend on plpgsql.) Why shouldn't it?