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: 7D564C35CACC4AA491B987F829D6E602@unencrypted.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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:
> http://www.postgresql.org/mailpref/pdxpug
>
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: http://www.postgresql.org/docs/current/static/sql-createsequence.html

--Dan

In response to

Responses

Browse pdxpug by date

  From Date Subject
Next Message Darrell Fuhriman 2011-03-29 22:06:07 Re: Adding Missing Data to a Table
Previous Message wes 2011-03-29 21:16:53 Re: Adding Missing Data to a Table