• Marc G. Fournier's avatar
    This patch can be installed as part of 1.02.1 so people can properly · 476ef109
    Marc G. Fournier authored
    pg_dump and load to 2.0.  I haven't gotten any feedback on whether
    people want it, so I am submitting it for others to decide.  I would
    recommend an install in 1.02.1.
    
    I had said that the 2.0 pg_dump could dump a 1.02.1 database, but I was
    wrong.  The copy is actually performed by the backend, and the 2.0
    database will not be able to read 1.02.1 databases because of the new
    system columns.
    
    This patch does several things.  It copies nulls out as \N, so they can
    be distinguished from '' strings.  It fixes a problem where backslashes
    in the input stream were not output as double-backslashes.  Without this
    patch, backslashes copied out were deleted upon input, or interpreted as
    special characters.  Third, input is now terminated by backslash-period.
    This can not be part of a normal input stream.
    
    I tested this by creating a database with all sorts of nulls, backslash,
    and period fields and dumped the database and reloaded into a new
    database and compared them.
    
    Submitted by: Bruce
    476ef109
psql.c 35 KB