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

Re: Adding Missing Data to a Table

From: Dan Colish <dan(at)unencrypted(dot)org>
To: pdxpug(at)postgresql(dot)org
Subject: Re: Adding Missing Data to a Table
Date: 2011-03-29 21:22:58
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pdxpug
On Tuesday, March 29, 2011 at 2:10 PM, Rich Shepard wrote:
On Tue, 29 Mar 2011, Dan Colish wrote:
> > want to use a sequence and initialize it above the existing id's.
> Dan,
>  Exactly. Is the procedure for doing this in one of the postgres manuals? I
> am unaware of how to retroactively apply a sequence to a column that is
> one-quarter filled.
> Thank you,
> Rich
> -- 
> Sent via pdxpug mailing list (pdxpug(at)postgresql(dot)org)
> To make changes to your subscription:
Well there are good docs for setting up a sequence. As for setting it up on your table, I believe an ALTER COLUMN using the sequence nextval as default should do it. Best to test this one out before doing it for real.

Here are the docs for sequence:


In response to


pdxpug by date

Next:From: Darrell FuhrimanDate: 2011-03-29 22:06:07
Subject: Re: Adding Missing Data to a Table
Previous:From: wesDate: 2011-03-29 21:16:53
Subject: Re: Adding Missing Data to a Table

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