Re: Strange bug

Поиск
Список
Период
Сортировка
От A. Kretschmer
Тема Re: Strange bug
Дата
Msg-id 20051129144350.GO31026@webserv.wug-glas.de
обсуждение исходный текст
Ответ на Strange bug  ("Leif B. Kristensen" <leif@solumslekt.org>)
Ответы Re: Strange bug  ("Leif B. Kristensen" <leif@solumslekt.org>)
Список pgsql-sql
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    === 


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Strange bug
Следующее
От: "Leif B. Kristensen"
Дата:
Сообщение: Re: Strange bug