Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id C01FAB5DC00 for ; Wed, 22 Jun 2011 10:12:53 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 94936-06 for ; Wed, 22 Jun 2011 13:12:47 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from smtp2.peak6.com (smtp2.peak6.com [38.98.137.9]) by mail.postgresql.org (Postfix) with ESMTP id 2CBE7B5DBE1 for ; Wed, 22 Jun 2011 10:12:46 -0300 (ADT) X-AuditID: 0a02cb1e-b7b55ae000000a02-72-4e01ea4d35f5 Message-ID: <4E01EA4D.3080205@peak6.com> Date: Wed, 22 Jun 2011 08:12:45 -0500 From: Shaun Thomas Reply-To: Organization: Peak6 User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.13) Gecko/20101210 Lightning/1.0b2 Thunderbird/3.1.7 MIME-Version: 1.0 To: Marti Raudsepp CC: Magnus Hagander , Svetlin Manavski , Subject: Re: seq scan in the case of max() on the primary key column References: <4DFA4D2F.8020101@peak6.com> In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed content-transfer-encoding: 7bit X-Originating-IP: [10.10.221.50] X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrJIsWRmVeSWpSXmKPExsXCxcQrpuv7itHP4M4LY4sVn+6wWhzftpDJ 4vrMc8wWc++eZXJg8dg56y67x6a248we+9onsnlc2DeNPYAlqoHRJjEvL78ksSRVISW1ONlW KcDV0dtMIbgkMS8lsShFwSWzODknMTM3tUhJITPFVslISaEgJzE5NTc1r8RWKbGgIDUvRcmO SwED2ACVZeYppOYl56dk5qXbKnkG++taWJha6hoq2cUjQEIbS8axL5cZCx6wVKxfuoStgfEJ cxcjJ4eEgInE1Lu/oGwxiQv31rOB2LwCGhLbth9hArFZBFQlbrdeBrPZBNQkFu6+yQhiCwnI SuxfdY4VxOYXEJbY96EJbI6oQKHEt6O3mCHmCEqcnPmEBcQWEVCRuDvtP1g9s0CdxJdrm8Hi wgJ+ElfPNwLVcwHNPM4o8XPFGrAjOAUcJY7MWscC0WAhsfjNQXYIW15i+9s5zBBHyEncaXgO VM8B9ICCxL2/ThMYhWYhWT0LSfcsJN0LGJlXMYoXlyUmZ2SaFRTnlhQY6hWkJmab6eWllmxi BEf4abkdjCsuKB5iFOBgVOLhFTjH4CfEmlhWXJl7iFGCg1lJhJfxJKOfEG9KYmVValF+fFFp TmrxIUZtYJhNZJbiTs4HJp+8knhjAwMlcd4vrm99hQTSgYkgOzW1ILUIppqJg1OqgTG7ylxQ k+Nz291VsZd22fE8/SBwPU1VScb9/uY3u1S+F5mLfbfx87r7RObpyshz/pGTsh9JJQe92Oqr 3rlBKP5xeHbmnsaLty7qxP/QauvK5LT0CbgheOFJj6Lz86L10mY7Wq//VLnpc4AlInXxXa1y E/moi6Ut6V8XcP5sYJD23Mr8j/UroxJLcUaioRZzUXEiAJJlVzb8AgAA X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201106/209 X-Sequence-Number: 44142 On 06/22/2011 04:55 AM, Marti Raudsepp wrote: > With Jim Nasby's idea to use regclass instead of relation names, the > function is now half its length and probably more reliable. There's no > need to touch pg_class directly at all. Sadly until we upgrade to EDB 9.0, I have to use my function. :) EDB 8.3 (which is really PostgreSQL 8.2) doesn't have a regclass->text conversion. But I'll bookmark the wiki page anyway, so I can update my function after upgrading. Heh. -- Shaun Thomas OptionsHouse | 141 W. Jackson Blvd. | Suite 800 | Chicago IL, 60604 312-676-8870 sthomas@peak6.com ______________________________________________ See http://www.peak6.com/email_disclaimer.php for terms and conditions related to this email