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

Patches for libpq++ docs and backend/command/copy.c

From: Tom Vijlbrief <tom(dot)vijlbrief(at)knoware(dot)nl>
To: pgsql-bugs(at)postgresql(dot)org
Subject: Patches for libpq++ docs and backend/command/copy.c
Date: 2000-04-19 09:36:32
Message-ID: 38FD7E20.6BE44F85@knoware.nl (view raw or flat)
Thread:
Lists: pgsql-bugs

============================================================================
                        POSTGRESQL BUG REPORT TEMPLATE
============================================================================
 
 
Your name               :       Tom Vijlbrief
Your email address      :       tom(dot)vijlbrief(at)knoware(dot)nl
 
 
System Configuration
---------------------
  Architecture (example: Intel Pentium)         : Intel PII
 
  Operating System (example: Linux 2.0.26 ELF)  : Linux 2.3.51
 
  PostgreSQL version (example: PostgreSQL-6.5.3):   PostgreSQL-6.5.3
 
  Compiler used (example:  gcc 2.8.0)           : egcs-2.91.66
 
 
Please enter a FULL description of your problem:          
------------------------------------------------
 
There are a few bugs in the doc for libpq++.
 
Incorrect use of lowercase methods (putline should be PutLine)
\et should be \t
\en should be \n
data.putline(".\en") should be data.PutLine("\\.\n")
...
 
I added a patch as attachment to this mail
 
I also found that there is a problem when a client
exits when "copy from stdin" is active. Postgres does
not detect that the connection is broken, the postmaster generates
many kilobytes (thousands of lines) of errors:
 
...
pq_recvbuf: unexpected EOF on client connection
pq_recvbuf: unexpected EOF on client connection            
pq_recvbuf: unexpected EOF on client connection
pq_recvbuf: unexpected EOF on client connection
pq_recvbuf: unexpected EOF on client connection
pq_recvbuf: unexpected EOF on client connection
pq_recvbuf: unexpected EOF on client connection
pq_recvbuf: unexpected EOF on client connection
pq_recvbuf: unexpected EOF on client connection
pq_recvbuf: unexpected EOF on client connection
ERROR:  CopyReadAttribute - attribute length too long. line: 4
pq_flush: send() failed: Broken pipe
pq_flush: send() failed: Broken pipe
pq_recvbuf: unexpected EOF on client connection
 
 
I added a patch for this problem also.
 
Note that I'm working on a C++ class derived from PgDatabase
that signals errors by throwing exceptions. I'll submit it when it's
finished...                             
 
Please describe a way to repeat the problem.   Please try to provide a
concise reproducible example, if at all possible:
----------------------------------------------------------------------
 
 
It can be reproduced by compiling and running the attached program
testbad.cxx
The program wil hang, exiting by hitting ^C (interrupt) wil produce
the error messages
 
The patched postgres will produce:
 
pq_recvbuf: unexpected EOF on client connection
pq_flush: send() failed: Broken pipe
pq_recvbuf: unexpected EOF on client connection
  
 
If you know how this problem might be fixed, list the solution below:
---------------------------------------------------------------------
 
two patches attached to mail

Attachment: doc.patch
Description: application/octet-stream (893 bytes)
Attachment: copy.patch
Description: application/octet-stream (1.0 KB)
Attachment: testbad.cxx
Description: application/octet-stream (1.1 KB)

Responses

pgsql-bugs by date

Next:From: Joshua JacksonDate: 2000-04-19 17:41:05
Subject: Bug in psql COPY command
Previous:From: Tom LaneDate: 2000-04-18 14:28:44
Subject: Re: 7.0RC1 on Linux Alpha

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group