Skip site navigation (1) Skip section navigation (2)

Re: changing sequence in serial field

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Julius Tuskenis <julius(at)nsoft(dot)lt>
Cc: Achilleas Mantzios <achill(at)matrix(dot)gatewaynet(dot)com>, pgsql-admin(at)postgresql(dot)org
Subject: Re: changing sequence in serial field
Date: 2008-07-04 15:49:56
Message-ID: 23310.1215186596@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-admin
Julius Tuskenis <julius(at)nsoft(dot)lt> 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

In response to

pgsql-admin by date

Next:From: Jessica RichardDate: 2008-07-04 16:00:06
Subject: How many table scans in a delete...
Previous:From: Achilleas MantziosDate: 2008-07-04 14:43:48
Subject: Re: how to get fy info from the parent table

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group