Re: Strange INSERT phenomenon with key constraints

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Lukas Ertl <l(dot)ertl(at)univie(dot)ac(dot)at>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Strange INSERT phenomenon with key constraints
Date: 2001-05-07 01:49:35
Message-ID: 16262.989200175@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Lukas Ertl <l(dot)ertl(at)univie(dot)ac(dot)at> writes:
> The problem is that after about 1000 rows of bar, I get a "violation of
> reference integrity", because obviously the db thinks, a value that I
> wanted to insert into foo_id is not a valid key in foo. (The error shows
> up randomly, not exactly at the 1000th row, but always above row 1000.)

I tried to duplicate this problem, using your script, but I saw no
failures in half a dozen tries.

I wonder whether you could have been running into a bug on the Perl
side. We've seen reports of various bugs in recent versions of DBD-Pg;
could it be that the query sent is not what you intended it to be?
You might try turning on query logging to see what queries are actually
received by the server.

For reference, I'm using
Postgres 7.1.1
Perl 5.005_03
DBI 1.15
DBD-Pg 0.95 + patch for bug with query parameters longer than 32k

The aforementioned patch shouldn't have anything to do with this;
I believe it's present in DBD-Pg 0.96 and up anyway.

regards, tom lane

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Stephen M. Ford 2001-05-07 14:47:47 Re: Install of postgresql
Previous Message Eric Naujock 2001-05-07 01:07:54 How do I do this?