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 8FCBB9DCBCC for ; Tue, 29 Nov 2005 10:43:51 -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 32277-02 for ; Tue, 29 Nov 2005 10:43:53 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.171]) by postgresql.org (Postfix) with ESMTP id 7ADC69DCB94 for ; Tue, 29 Nov 2005 10:43:46 -0400 (AST) Received: from [194.25.154.138] (helo=webserv.wug.de) by mrelayeu.kundenserver.de (node=mrelayeu6) with ESMTP (Nemesis), id 0ML29c-1Eh6hy3ROn-0002re; Tue, 29 Nov 2005 15:43:51 +0100 Received: from kretschmer by webserv.wug.de with local (Exim 3.36 #1) id 1Eh6hy-0003Fr-00 for pgsql-sql@postgresql.org; Tue, 29 Nov 2005 15:43:50 +0100 Date: Tue, 29 Nov 2005 15:43:50 +0100 From: "A. Kretschmer" To: pgsql-sql@postgresql.org Subject: Re: Strange bug Message-ID: <20051129144350.GO31026@webserv.wug-glas.de> Mail-Followup-To: "A. Kretschmer" , pgsql-sql@postgresql.org References: <200511291531.30441.leif@solumslekt.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200511291531.30441.leif@solumslekt.org> X-DEST: 208 X-OS: Linux - weil ich es mir Wert bin! X-Info: registrierter Linux-User 97922 http://counter.li.org User-Agent: mutt-ng 1.5.9i (Linux) X-Provags-ID: kundenserver.de abuse@kundenserver.de login:51ea9561fc3f6d9539a2acd743e4748c X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.53 required=5 tests=[AWL=0.530] X-Spam-Score: 0.53 X-Spam-Level: X-Archive-Number: 200511/271 X-Sequence-Number: 23522 am 29.11.2005, um 15:31:30 +0100 mailte Leif B. Kristensen folgendes: > CREATE TABLE citations ( > citation_id INTEGER PRIMARY KEY, > source_fk INTEGER REFERENCES sources (source_id) > ); > > CREATE TABLE relation_citations ( > relation_fk INTEGER REFERENCES relations (relation_id) > ) INHERITS (citations); You are using inheritation in PostgreSQL. > > ALTER TABLE relation_citations > ADD CONSTRAINT source_relation_citation UNIQUE > (source_fk, relation_fk); > CREATE INDEX cit_relation_key ON relation_citations (relation_fk); > > And here is the accident: > > pgslekt=> insert into relation_citations values (64062,4578,20017); > INSERT 1478990 1 > pgslekt=> insert into relation_citations values (64062,4578,20018); > INSERT 1478991 1 Right, the uniq contraints are on (source_fk, relation_fk). No problem. > > I got an error when I transferred the data to my Web database running > MySQL: MySQL is a other RDBMS. You can't expect that all features from PostgreSQL are working with MySQL. > > ERROR 1062 at line 19839 in file: 'ss_relation_citations.sql': Duplicate > entry '64062' for key 1 My guess: MySQL can't handle inheritance. HTH, Andreas -- Andreas Kretschmer (Kontakt: siehe Header) Heynitz: 035242/47212, D1: 0160/7141639 GnuPG-ID 0x3FFF606C http://wwwkeys.de.pgp.net === Schollglas Unternehmensgruppe ===