Re: Multi row sequence?
От | Filip Wuytack |
---|---|
Тема | Re: Multi row sequence? |
Дата | |
Msg-id | 20041218171928.BA1553CC833@svr1.postgresql.org обсуждение исходный текст |
Ответ на | Re: Multi row sequence? (Bruno Wolff III <bruno@wolff.to>) |
Список | pgsql-general |
I'm working on a database that will contain companies (group) and the relevant listing (securities-> id) and related periodic information. I want the end users of the data to see the relationship between the 2 (comp A, security 01, security 02;comp B, security 01, security 02) in the key (company,security) as this would for part of the keys in all the other related tables (depending if the info is on a company level or security level and e.g using the date). By using a normal increment value as unique key, I would loose this relation information in key, no? Thanks for your input on this... ~ Filip -----Original Message----- From: Bruno Wolff III [mailto:bruno@wolff.to] Sent: 18 December 2004 17:08 To: Filip Wuytack Cc: pgsql-general@postgresql.org Subject: Re: Multi row sequence? On Fri, Dec 17, 2004 at 11:10:12 -0000, Filip Wuytack <fwuytack@fgscapital.com> wrote: > Hi, > > I just started looking into PostgreSQL (coming from Mysql before), but have > a question: > > Is it possible to have a sequence (as a multirow prim key), where sequence > (id) only increase per group of data (grp). Why do you want to do this? It would be a lot simpler to generate unique values over the table and that will work just fine if all you need is uniqueness.
В списке pgsql-general по дате отправления: