X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 45E589DC84D for ; Wed, 14 Dec 2005 06:26:09 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 32310-01 for ; Wed, 14 Dec 2005 06:26:10 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from smtp7.libero.it (smtp7.libero.it [193.70.192.90]) by postgresql.org (Postfix) with ESMTP id 063899DC81E for ; Wed, 14 Dec 2005 06:26:06 -0400 (AST) Received: from localhost (172.16.1.74) by smtp7.libero.it (7.0.027-DD01) id 439D91A3003261D3 for pgsql-sql@postgresql.org; Wed, 14 Dec 2005 11:26:08 +0100 Received: from smtp2.libero.it ([172.16.1.97]) by localhost (asav16.libero.it [193.70.193.3]) (amavisd-new, port 10024) with ESMTP id 17639-04-7 for ; Wed, 14 Dec 2005 11:26:07 +0100 (CET) Received: from [172.16.0.5] (ppp-103-202.24-151.libero.it [151.24.202.103]) by smtp2.libero.it (Postfix) with ESMTP id 7B289A8C89 for ; Wed, 14 Dec 2005 11:26:07 +0100 (MET) Message-ID: <439FF3A3.7080909@moonwatcher.it> Date: Wed, 14 Dec 2005 11:27:47 +0100 From: Gianluca Riccardi User-Agent: Mozilla/5.0 (X11; U; Linux i686; it-IT; rv:1.7.8) Gecko/20050927 Debian/1.7.8-1sarge3 X-Accept-Language: it MIME-Version: 1.0 To: pgsql-sql@postgresql.org Subject: Re: DB design and foreign keys References: <439F0FE8.1050503@moonwatcher.it> <1134500394.3587.115.camel@state.g2switchworks.com> In-Reply-To: <1134500394.3587.115.camel@state.g2switchworks.com> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Scanned: with antispam and antivirus automated system at libero.it X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0 required=5 tests=[none] X-Spam-Score: 0 X-Spam-Level: X-Archive-Number: 200512/117 X-Sequence-Number: 23659 [cut] > Given this table layout, I'm gonna take a wild guess and ask if you're > coming from MySQL and expecting the second serial order_code to be a > sub-autoincrement to id? > no, always used PostgreSQL, but i'm having a deeper approach now, until now i've been using th ORDBMS in a very 'easy' manner :( > If so, it won't be. That's a mysqlism. If > you want something similar, you'll have to implement it yourself, and > note that such a thing tends to be a poor performer with lots of > parallel updates, and it can also be susceptible to race conditions if > no locking is used. > > thank you, regards, Gianluca Riccardi