Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 5129E64FD64 for ; Fri, 4 Jul 2008 12:50:13 -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 76658-10 for ; Fri, 4 Jul 2008 12:50:08 -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 postgresql.org (Postfix) with ESMTP id 8C40C650E96 for ; Fri, 4 Jul 2008 12:50: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 m64FnuMB023311; Fri, 4 Jul 2008 11:49:57 -0400 (EDT) To: Julius Tuskenis cc: Achilleas Mantzios , pgsql-admin@postgresql.org Subject: Re: changing sequence in serial field In-reply-to: <486DC626.7040008@nsoft.lt> References: <486CE004.8000400@nsoft.lt> <200807031808.47683.achill@matrix.gatewaynet.com> <486DC626.7040008@nsoft.lt> Comments: In-reply-to Julius Tuskenis message dated "Fri, 04 Jul 2008 09:41:42 +0300" Date: Fri, 04 Jul 2008 11:49:56 -0400 Message-ID: <23310.1215186596@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200807/69 X-Sequence-Number: 29679 Julius Tuskenis writes: > b_prekes_br_kodas_pbk_id_seq1 was created automatically creating serial field and is in some way connected to it. Thats why I get error saying "...column pbk_id requires it." Any way I can't find a way to find and alter this dependency. It's a row in pg_depend. In 8.2 and up you can create/delete the row with ALTER SEQUENCE OWNED BY, but in earlier releases you'd have to do it manually. regards, tom lane