Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id CD34F633034 for ; Tue, 10 Mar 2009 01:37:12 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 11918-06 for ; Tue, 10 Mar 2009 01:37:10 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 035C56329F3 for ; Tue, 10 Mar 2009 01:37:08 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id n2A4b2Ak021669; Tue, 10 Mar 2009 00:37:03 -0400 (EDT) To: Oliver Jowett cc: "Dickson S. Guedes" , pgsql-jdbc Subject: Re: Renaming sequence auto generated by SERIAL type don't update pg_attrdef In-reply-to: <49B5E761.4060507@opencloud.com> References: <1236650119.6410.73.camel@guedes-laptop> <20795.1236655715@sss.pgh.pa.us> <49B5E208.1080205@opencloud.com> <21151.1236657248@sss.pgh.pa.us> <49B5E761.4060507@opencloud.com> Comments: In-reply-to Oliver Jowett message dated "Tue, 10 Mar 2009 17:06:57 +1300" Date: Tue, 10 Mar 2009 00:37:02 -0400 Message-ID: <21668.1236659822@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200903/48 X-Sequence-Number: 19378 Oliver Jowett writes: > Tom Lane wrote: >> pg_catalog.pg_get_expr(adbin, adrelid) > I don't think DBMD.getColumns() is expected to be called all that much, > certainly not in performance-critical paths, so perhaps the more complex > expression is the way to go. How far back, version-wise, will that > expression work? According to the pg_dump sources, that's good back to 7.3 ... do you care about earlier? >> BTW, is there a reason for the query to be using LIKE 'name' instead of >> = 'name'? And if so, is whatever generates it smart about underscores >> and % and \ in the name? > The API lets the application specify a pattern to search on, using the > same syntax that LIKE expects, so the driver just passes it straight > through into the query (modulo normal string escaping) Fair enough. I was just trying to remember whether the planner was smart enough to consider LIKE 'constant-pattern' to be equivalent to = 'constant-pattern' even when the locale prevents doing anything smarter for non-constant patterns. But that'd be my problem to fix not yours ... regards, tom lane