From: | PFC <lists(at)boutiquenumerique(dot)com> |
---|---|
To: | bernard(at)bgsoftfactory(dot)com, pgsql-sql(at)postgresql(dot)org |
Subject: | Re: Newbie wonder... |
Date: | 2005-03-14 09:02:08 |
Message-ID: | opsnmd1uimth1vuj@localhost |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
If you want to add a SERIAL field to an existing table, create a sequence
and then create an integer field with default nextval(seq) and postgres
will fill it automatically. The order in which it will fill it is not
guaranteed though !
However, you might also like to de-dupe your data once it's in the
additional tables, thus you might need more complicated measures.
> (2) How should I go to create a sequence for an existing table? For all
> futures data entry, after this conversion, I want the unique ID for each
> row to come from a sequence, but if I know how to create a table using
> serial, I am not sure how to modify one for this.
>
> Thanks,
> Bernard
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
>
From | Date | Subject | |
---|---|---|---|
Next Message | pginfo | 2005-03-14 09:40:12 | Re: lower and unicode |
Previous Message | PFC | 2005-03-14 08:58:10 | Re: group by before and after date |