Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 8B7C1633226 for ; Tue, 10 Mar 2009 00:28:44 -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 97645-09 for ; Tue, 10 Mar 2009 00:28:43 -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 17428633098 for ; Tue, 10 Mar 2009 00:28:37 -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 n2A3SZTS020796; Mon, 9 Mar 2009 23:28:36 -0400 (EDT) To: "Dickson S. Guedes" cc: pgsql-jdbc Subject: Re: Renaming sequence auto generated by SERIAL type don't update pg_attrdef In-reply-to: <1236650119.6410.73.camel@guedes-laptop> References: <1236650119.6410.73.camel@guedes-laptop> Comments: In-reply-to "Dickson S. Guedes" message dated "Mon, 09 Mar 2009 22:55:19 -0300" Date: Mon, 09 Mar 2009 23:28:35 -0400 Message-ID: <20795.1236655715@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/43 X-Sequence-Number: 19373 "Dickson S. Guedes" writes: > Shouldn't the JDBC driver use another query instead that, since docs > alerts[1] to this problem? What's the default value being used for anyway? If it's to determine which sequence is associated with the column, I think you shouldn't be looking at pg_attrdef at all; you should look for a dependent sequence via pg_depend. But maybe it's only being used to check if the column has a default, in which case the possible staleness of the string value isn't important. regards, tom lane