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:[EMAIL PROTECTED] Sent: 18 December 2004 17:08 To: Filip Wuytack Cc: [EMAIL PROTECTED] Subject: Re: Multi row sequence? On Fri, Dec 17, 2004 at 11:10:12 -0000, Filip Wuytack <[EMAIL PROTECTED]> 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. ---------------------------(end of broadcast)--------------------------- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faqs/FAQ.html