Re: Remove Modifiers on Table - Mailing list pgsql-general

From Carlos Mennens
Subject Re: Remove Modifiers on Table
Date
Msg-id BANLkTik45XKaVxNJOE16Y-ZPt+6rOT6vrA@mail.gmail.com
Whole thread Raw
In response to Re: Remove Modifiers on Table  (Bosco Rama <postgres@boscorama.com>)
Responses Re: Remove Modifiers on Table  (Jaime Casanova <jaime@2ndquadrant.com>)
List pgsql-general
On Mon, May 16, 2011 at 4:58 PM, Bosco Rama <postgres@boscorama.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!

pgsql-general by date:

Previous
From: Roger Leigh
Date:
Subject: Adapting existing extensions to use CREATE EXTENSION
Next
From: Jaime Casanova
Date:
Subject: Re: Remove Modifiers on Table