Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 961AE9FB32C for ; Mon, 2 Oct 2006 22:50:03 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 30491-08 for ; Mon, 2 Oct 2006 22:49:58 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from noel.decibel.org (noel.decibel.org [67.100.216.10]) by postgresql.org (Postfix) with ESMTP id 7E1D79FB31E for ; Mon, 2 Oct 2006 22:49:58 -0300 (ADT) Received: from [192.168.0.59] (unknown [12.161.221.132]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by noel.decibel.org (Postfix) with ESMTP id C14F556423; Mon, 2 Oct 2006 20:49:56 -0500 (CDT) In-Reply-To: <4521A141.1090505@nec.co.nz> References: <452078EC.90300@nec.co.nz> <26736.1159758079@sss.pgh.pa.us> <20061002191123.GH81937@nasby.net> <4521A141.1090505@nec.co.nz> Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Cc: pgsql-performance@postgresql.org Content-Transfer-Encoding: 7bit From: Jim Nasby Subject: Re: selecting data from information_schema.columns Date: Mon, 2 Oct 2006 21:49:49 -0400 To: Steve Martin X-Mailer: Apple Mail (2.752.2) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.169 tagged_above=0 required=5 tests=AWL, SPF_PASS X-Spam-Level: X-Archive-Number: 200610/15 X-Sequence-Number: 21144 On Oct 2, 2006, at 7:31 PM, Steve Martin wrote: > Regarding, newsysviews, what is the current state, I have had a > quick look at the pgFoundry site and the last updates were 9 months > ago. Well, the system catalogs don't change terribly often, so it's not like a lot needs to be done. We'd hoped to get them into core, but that didn't pan out. Theoretically, we should be making the views look more like information_schema, but no one's gotten to it yet. > The most efficient way in the short term I can find to improve > performance for our application is to create a table from > information_schema.columns and update it when tables a created or > deleted, or columns added or removed. E.g. Well, there's nothing that says you have to use information_schema. You can always query the catalog tables directly. Even if you don't want to use newsysviews as-is, the code there should be very helpful for doing that. There is no ability to put triggers on DDL, so the best you could do with your caching table is to just periodically update it. -- Jim Nasby jim@nasby.net EnterpriseDB http://enterprisedb.com 512.569.9461 (cell)