SERIAL type - auto-increment grouped by other field

Поиск
Список
Период
Сортировка
От Paulovič Michal
Тема SERIAL type - auto-increment grouped by other field
Дата
Msg-id 1078019041.404143e15ac52@www.prima.sk
обсуждение исходный текст
Ответы Re: SERIAL type - auto-increment grouped by other field  (Shachar Shemesh <psql@shemesh.biz>)
Re: SERIAL type - auto-increment grouped by other field  (elein <elein@varlena.com>)
Список pgsql-general
hi all,

I have problem with SERIAL field type (or sequence functionality).
I have table with three columns - ID, IDS, NAME.
I want auto-increment IDS grouped by ID.
Example:
1, 1, Ferdo
1, 2, John
2, 1, Martin
1, 3, Elvira
2, 2, Georgia

but...
when I use IDS - SERIAL and when I create UNIQUE (ID, IDS) result is:
1, 1, Ferdo
1, 2, John
2, 3, Martin
1, 4, Elvira
2, 5, Georgia

where i make misstake??? how can i do it??? in documentation there is
description only for one auto-increment column. I didn't find auto increment as
I described upper. Do you have any idea how can I do it???

tnx a lot


________ Information from NOD32 ________
This message was checked by NOD32 Antivirus System for Linux Mail Server.
http://www.nod32.com

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

Предыдущее
От: "Christoph Graf"
Дата:
Сообщение: inheritance of triggers (OO tables)
Следующее
От: Ben
Дата:
Сообщение: ispell tsearch2 dictionary