From: | Carlos Mennens <carlos(dot)mennens(at)gmail(dot)com> |
---|---|
To: | PostgreSQL <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Remove Modifiers on Table |
Date: | 2011-05-17 15:14:37 |
Message-ID: | BANLkTik45XKaVxNJOE16Y-ZPt+6rOT6vrA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Mon, May 16, 2011 at 4:58 PM, Bosco Rama <postgres(at)boscorama(dot)com> wrote:
> If you are truly intent on removing the sequence you'll need to do the
> following:
>
> alter sequence users_seq_id owned by NONE
> alter table users alter column id drop default
> drop sequence users_seq_id
Yes that worked perfect! I'm just curious if I have 20 tables and then
want all the 'id' columns to be auto incrementing , that means I have
to have 20 listed sequences for all 20 unique tables? Seems very
cluttered and messy for PostgreSQL. Can one sequence be attributed to
multiple columns in multiple tables? I'm used to MySQL where this was
as easy as running:
CREATE TABLE test (
id INT PRIMARY KEY AUTO INCREMENT);
I guess this is not the case in PostgreSQL, right?
Thank you!
From | Date | Subject | |
---|---|---|---|
Next Message | Jaime Casanova | 2011-05-17 15:22:55 | Re: Remove Modifiers on Table |
Previous Message | Roger Leigh | 2011-05-17 14:23:18 | Adapting existing extensions to use CREATE EXTENSION |