Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 21C4E650E82 for ; Thu, 3 Jul 2008 12:08:58 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 75641-01 for ; Thu, 3 Jul 2008 12:08:51 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from smadev.internal.net (host3.dynacom.ondsl.gr [62.103.35.211]) by postgresql.org (Postfix) with ESMTP id 1E9AD64FD64 for ; Thu, 3 Jul 2008 12:08:50 -0300 (ADT) Received: from smadev.internal.net (localhost [127.0.0.1]) by smadev.internal.net (8.14.2/8.14.2) with ESMTP id m63F8mJa073082 for ; Thu, 3 Jul 2008 18:08:48 +0300 (EEST) (envelope-from achill@matrix.gatewaynet.com) Received: from localhost (localhost [[UNIX: localhost]]) by smadev.internal.net (8.14.2/8.14.2/Submit) id m63F8lJo073081 for pgsql-admin@postgresql.org; Thu, 3 Jul 2008 18:08:47 +0300 (EEST) (envelope-from achill@matrix.gatewaynet.com) From: Achilleas Mantzios Organization: Dynacom Tankers Mgmt To: pgsql-admin@postgresql.org Subject: Re: changing sequence in serial field Date: Thu, 3 Jul 2008 18:08:47 +0300 User-Agent: KMail/1.9.7 References: <486CE004.8000400@nsoft.lt> In-Reply-To: <486CE004.8000400@nsoft.lt> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200807031808.47683.achill@matrix.gatewaynet.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200807/41 X-Sequence-Number: 29651 =CE=A3=CF=84=CE=B9=CF=82 Thursday 03 July 2008 17:19:48 =CE=BF/=CE=B7 Juliu= s Tuskenis =CE=AD=CE=B3=CF=81=CE=B1=CF=88=CE=B5: > Hello >=20 > I noticed, that some serial field is using wrong sequence, so I altered=20 > the default value pointing to the sequence I want, but now I cant delete= =20 > currently no longer used sequence. Did I do someting wrong changing it? >=20 > PgSQL 8.1 on Gentoo Linux. >=20 >=20 > What I try to do > DROP SEQUENCE b_prekes_br_kodas_pbk_id_seq1; try ALTER SEQUENCE b_prekes_br_kodas_pbk_id_seq1 OWNED BY NONE; first, adn then drop. >=20 > Result > ERROR: cannot drop sequence b_prekes_br_kodas_pbk_id_seq1 because table= =20 > b_prekes_br_kodas column pbk_id requires it > HINT: You may drop table b_prekes_br_kodas column pbk_id instead. >=20 > ********** Error ********** >=20 > ERROR: cannot drop sequence b_prekes_br_kodas_pbk_id_seq1 because table=20 > b_prekes_br_kodas column pbk_id requires it > SQL state: 2BP01 > Hint: You may drop table b_prekes_br_kodas column pbk_id instead. >=20 > --=20 > Julius Tuskenis > Programavimo skyriaus vadovas > UAB nSoft > mob. +37068233050 >=20 >=20 =2D-=20 Achilleas Mantzios