Minor usability/debuggability suggestion...

RI violation error messages in 7.0.0 do not appear to identify the
offending value.

Example:

ERROR:  fk_employee_currency referential integrity violation - key
referenced from employee not found in currency

Easier to debug would be:

ERROR:  fk_employee_currency referential integrity violation - key '27'
referenced from employee not found in currency

Regards,
Ed Loehr

Tue, 05 Dec 2000 14:24:24 -0600
Ed Loehr <eloehr@austin.rr.com>
RI violation msg suggestion
Greetings!  'copy from stdin' on 7.0.2 appears to simply hang if more
than ~ 1000 records follow in one shot.  I couldn't see this behavior
documented anywhere.  Is this a bug?

Take care,
-- 
Camm Maguire			     			camm@enhanced.com
==========================================================================
"The earth is but one country, and mankind its citizens."  --  Baha'u'llah

05 Dec 2000 15:50:51 -0500
Camm Maguire <camm@enhanced.com>
copy from stdin limits
Camm Maguire <camm@enhanced.com> writes:
> Greetings!  'copy from stdin' on 7.0.2 appears to simply hang if more
> than ~ 1000 records follow in one shot.  I couldn't see this behavior
> documented anywhere.  Is this a bug?

I've never heard of any such behavior ... and you can be sure that we'd
have heard about this, since any moderately large pg_dump file would
trigger such a bug.  You must have something else going on.  Details
please?

			regards, tom lane

Tue, 05 Dec 2000 16:19:52 -0500
Tom Lane <tgl@sss.pgh.pa.us>
Re: copy from stdin limits 
Greetings, and thank you for your reply.

OK, I have 4 tables, and a view on a merge of the 4.  I have a trigger
on insert into table 3, and a trigger on insert into the view, which
basically just takes the input data, does a few selects on the tables,
and inserts the appropriate portions of the data into each table as
necessary.  

When I copy up to ~ 1000 lines of a file into this view, everything
goes fine.  More than that, and after a while, cpu activity stops,
disk activity stops, and the job hangs indefinitely.  Control-C gives
the later message "You have to get out of copy state yourself".  I can
provide the schema if needed.

Thanks for your help!


Tom Lane <tgl@sss.pgh.pa.us> writes:

> Camm Maguire <camm@enhanced.com> writes:
> > Greetings!  'copy from stdin' on 7.0.2 appears to simply hang if more
> > than ~ 1000 records follow in one shot.  I couldn't see this behavior
> > documented anywhere.  Is this a bug?
> 
> I've never heard of any such behavior ... and you can be sure that we'd
> have heard about this, since any moderately large pg_dump file would
> trigger such a bug.  You must have something else going on.  Details
> please?
> 
> 			regards, tom lane
> 
> 

-- 
Camm Maguire			     			camm@enhanced.com
==========================================================================
"The earth is but one country, and mankind its citizens."  --  Baha'u'llah

07 Dec 2000 11:30:35 -0500
Camm Maguire <camm@enhanced.com>
Re: copy from stdin limits
Camm Maguire <camm@enhanced.com> writes:
> OK, I have 4 tables, and a view on a merge of the 4.  I have a trigger
> on insert into table 3, and a trigger on insert into the view, which
> basically just takes the input data, does a few selects on the tables,
> and inserts the appropriate portions of the data into each table as
> necessary.  

> When I copy up to ~ 1000 lines of a file into this view, everything
> goes fine.

I'm a bit startled that COPY to a view works at all ;-).  But it does
look like copy honors triggers, so in principle the above ought to work.

I'll need to see the complete details of the trigger and all the
referenced table declarations --- probably don't need the data, though,
unless the trigger needs to have nonempty tables to start with.

			regards, tom lane

Thu, 07 Dec 2000 12:43:32 -0500
Tom Lane <tgl@sss.pgh.pa.us>
Re: copy from stdin limits 