Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: Consulta Foreign Key


  • From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
  • To: Juan Manuel Fernandez <jmfernandez(at)unlu(dot)edu(dot)ar>
  • Cc: Lista - PostgreSQL <pgsql-es-ayuda(at)postgresql(dot)org>
  • Subject: Re: Consulta Foreign Key
  • Date: Mon, 28 Apr 2008 18:16:28 -0400
  • Message-id: <20080428221628(dot)GJ5761(at)alvh(dot)no-ip(dot)org>

Juan Manuel Fernandez escribió:
> Hasta que lo que yo se una foreign key debe reflejar algun valor que
> este en la tabla que referencia o debe ser nula...
> 
> Que esta pasando? ya estoy mareado :(
> 
> Warning: pg_query() [function.pg-query]: Query failed: ERROR: insert
> or update on table "t_asignaturas_dictadas" violates foreign key
> constraint "fkc_reglamentan0002" DETAIL: Key (nro_disposicion)=() is
> not present in table "t_programas". in C:\xampp\htdocs\alta_oferta.php
> on line 49

Un string vacio no es lo mismo que un NULL.

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group