Re: Auto increment/sequence on multiple columns?

Поиск
Список
Период
Сортировка
От Thomas F.O'Connell
Тема Re: Auto increment/sequence on multiple columns?
Дата
Msg-id 28B0BAF0-03C5-11D9-8609-000D93AE0944@sitening.com
обсуждение исходный текст
Ответ на Auto increment/sequence on multiple columns?  (nboutelier@hotmail.com (Nick))
Список pgsql-general
How does this imply one sequence? Is it guaranteed that for each value
of a, the values of b will be equivalent to all (and only) values of a?

There's plenty of flexibility within postgres for ways to use sequences.

Regardless, I think you need to have (and present) a better idea of
what you're trying to do with your data, which itself might be tedious,
but good data design will save you countless headaches down the road.

-tfo

On Sep 10, 2004, at 7:32 PM, Nick wrote:

> Is it possible to have a sequence across two columns. For example
>
> table1
> +---+---+
> | a | b |
> +---+---+
> | 1 | 1 |
> | 1 | 2 |
> | 1 | 3 |
> | 2 | 1 |
> | 2 | 2 |
> | 2 | 3 |
> | 3 | 1 |
> | 3 | 2 |
> | 3 | 3 |
> +---+---+
>
> Would I have to create a new sequence for every unique 'a' column?
> That seems pretty tedious. -Nick


В списке pgsql-general по дате отправления:

Предыдущее
От: Thomas F.O'Connell
Дата:
Сообщение: Re: Best practices for migrating a development database to a release database
Следующее
От: Anton Nikiforov
Дата:
Сообщение: pg_shadow in a constraint