[GENERAL] Key not present in table, but it is.

2012-07-11 Thread Emanuel Calvo
Version: psql version 9.0, server version 9.1. PostgreSQL 9.1.3 on x86_64-apple-darwin11.3.0, compiled by i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.1.00), 64-bit Executed the following statement: INSERT INTO dia4.veraz(dni,desde) ( SELECT

Re: [GENERAL] Key not present in table, but it is.

2012-07-11 Thread Tom Lane
Emanuel Calvo postgres@gmail.com writes: Executed the following statement: ... ERROR: insert or update on table veraz violates foreign key constraint veraz_dni_fkey DETAIL: Key (dni)=(21530976) is not present in table persona. But the record is present: coches=# select * from

Re: [GENERAL] Key not present in table, but it is.

2012-07-11 Thread Emanuel Calvo
2012/7/11 Tom Lane t...@sss.pgh.pa.us: Emanuel Calvo postgres@gmail.com writes: Executed the following statement: ... ERROR: insert or update on table veraz violates foreign key constraint veraz_dni_fkey DETAIL: Key (dni)=(21530976) is not present in table persona. But the record is