Go to file
Bruce Momjian a598385f3b Our code had:
if (c == '\\' && cstate->line_buf.len == 0)

The problem with that is the because of the input and _output_
buffering, cstate->line_buf.len could be zero even if we are not on the
first character of a line.  In fact, for a typical line, it is zero for
all characters on the line.  The proper solution is to introduce a
boolean, first_char_in_line, that we set as we enter the loop and clear
once we process a character.

I have restructured the line-reading code in copy.c by:

        o  merging the CSV/non-CSV functions into a single function
        o  used macros to centralize and clarify the buffering code
        o  updated comments
        o  renamed client_encoding_only to encoding_embeds_ascii
        o  added a high-bit test to the encoding_embeds_ascii test for
           performance
        o  in CSV mode, allow a backslash followed by a non-period to
           continue being processed as a data value

There should be no performance impact from this patch because it is
functionally equivalent.  If you apply the patch you will see copy.c is
much clearer in this area now and might suggest additional
optimizations.

I have also attached a 8.1-only patch to fix the CSV \. handling bug
with no code restructuring.
2005-12-27 18:10:48 +00:00
config Allow installation into directories containing spaces in the name. 2005-12-09 21:19:36 +00:00
contrib Multibyte encodings support for ISpell dictionary 2005-12-21 13:05:49 +00:00
doc Rename pg_make_encrypted_password to PQencryptPassword. 2005-12-26 14:58:06 +00:00
src Our code had: 2005-12-27 18:10:48 +00:00
COPYRIGHT Tag appropriate files for rc3 2004-12-31 22:04:05 +00:00
GNUmakefile.in Remove the contents of the src/corba subdirectory: this has been dead code 2005-05-01 06:15:51 +00:00
Makefile please find attached an alternate submission which addresses open item 2004-10-06 08:50:02 +00:00
README Remove more traces of libpgtcl from the source tree. Also, make some 2004-10-01 02:00:44 +00:00
README.CVS Some further editorializing on README.CVS. 2004-03-28 06:09:08 +00:00
aclocal.m4 Add new auto-detection of thread flags. 2004-04-23 18:15:55 +00:00
configure Add URL for Solaris qsort() bug. 2005-12-17 00:35:50 +00:00
configure.in Add URL for Solaris qsort() bug. 2005-12-17 00:35:50 +00:00

README

PostgreSQL Database Management System
=====================================
  
This directory contains the source code distribution of the PostgreSQL
database management system.

PostgreSQL is an advanced object-relational database management system
that supports an extended subset of the SQL standard, including
transactions, foreign keys, subqueries, triggers, user-defined types
and functions.  This distribution also contains C language bindings.

The JDBC, ODBC, C++, Python, and Tcl interfaces have been moved to the
PostgreSQL Projects Web Site at http://gborg.postgresql.org for separate
maintenance.  A Perl DBI/DBD driver is available from CPAN.

See the file INSTALL for instructions on how to build and install
PostgreSQL.  That file also lists supported operating systems and
hardware platforms and contains information regarding any other
software packages that are required to build or run the PostgreSQL
system.  Changes between all PostgreSQL releases are recorded in the
file HISTORY.  Copyright and license information can be found in the
file COPYRIGHT.  A comprehensive documentation set is included in this
distribution; it can be read as described in the installation
instructions.

The latest version of this software may be obtained at
ftp://ftp.postgresql.org/pub/.  For more information look at our web
site located at http://www.postgresql.org/.