Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id 5B3BFA1C0B8 for ; Wed, 8 Aug 2012 20:43:07 -0300 (ADT) Received: from guinness.omniscient.com ([205.129.9.5]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SzFu7-0005k1-4V for pgsql-bugs@postgresql.org; Wed, 08 Aug 2012 23:43:07 +0000 Received: from guinness.omniscient.com (localhost [127.0.0.1]) by guinness.omniscient.com (8.14.5/8.14.4) with ESMTP id q78NgpB2019292; Wed, 8 Aug 2012 19:42:51 -0400 (EDT) Message-Id: <201208082342.q78NgpB2019292@guinness.omniscient.com> To: Tom Lane cc: pgsql-bugs@postgresql.org Subject: Re: renaming+recreating table w/default sequence causes dependency seq issue In-reply-to: <162.1344397327@sss.pgh.pa.us> References: <201208080010.q780APDf006070@guinness.omniscient.com> <162.1344397327@sss.pgh.pa.us> Comments: In-reply-to Tom Lane message dated "Tue, 07 Aug 2012 23:42:07 -0400." Date: Wed, 08 Aug 2012 19:42:51 -0400 From: Todd Kover X-Virus-Scanned: clamav-milter 0.97.3-exp at guinness.omniscient.com X-Virus-Status: Clean X-Spam-Status: No, score=-1.1 required=5.0 tests=ALL_TRUSTED,AWL,MISSING_MID autolearn=no version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on guinness.omniscient.com X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.2.7 (guinness.omniscient.com [127.0.0.1]); Wed, 08 Aug 2012 19:42:52 -0400 (EDT) X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201208/44 X-Sequence-Number: 33768 > I don't see any bug there. The ALTER DROP DEFAULT command does not > remove the sequence's dependence on foo.id; nor for that matter > does ALTER SET DEFAULT create an auto-drop dependency on the new > table. See ALTER SEQUENCE OWNED BY if you want to dissociate a > serial column's sequence from the column, or reattach it to another > column. > > Formally speaking, a "serial column" is shorthand for creating an > integer (or bigint) column, creating a sequence, associating them as > though by ALTER SEQUENCE OWNED BY, and setting the column's default > to nextval('sequence-name'). I stand corrected. It would be nice if \ds or \ds+ or something showed this relationship so it was evident. That's more of a feature request than a bug fix tho. apologies for the misdirection. -Todd