Re: Remove Modifiers on Table

Поиск
Список
Период
Сортировка
От Carlos Mennens
Тема Re: Remove Modifiers on Table
Дата
Msg-id BANLkTik45XKaVxNJOE16Y-ZPt+6rOT6vrA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Remove Modifiers on Table  (Bosco Rama <postgres@boscorama.com>)
Ответы Re: Remove Modifiers on Table
Список 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 по дате отправления:

Предыдущее
От: Roger Leigh
Дата:
Сообщение: Adapting existing extensions to use CREATE EXTENSION
Следующее
От: Jaime Casanova
Дата:
Сообщение: Re: Remove Modifiers on Table