Thread

  1. (no subject)

    hook <hook@kcp.com> — 2003-08-07T10:14:16Z

    We have been using 7.3.3 on several different applications and have 
    discovered an anomaly.
    Backups are done nightly using "pg_dump --attribute-inserts -f 
    att.dump.`dcode` spdb";
    Dump files are used to restore and test. This test method has been used 
    successfully on
    all previous versions. However, in 7.3.3, when the dump utility hits a 
    carriage return imbeded with in a text field, the
    dump utility immeadiately jumps to the next record rendering the dump of 
    successive records useless.
    i.e.
    INSERT INTO registry (rid, sid, aflag, fname, lname, mi, addr, city, 
    state, zip, phone, email, weddate, regdate, items, \
    notes, ref) VALUES (1148, 503, NULL, 'Jillian', 'Kooker', ' ', '', '', 
    '', '', '610-649-3327', '', '2002-10-24', '2002-0\
    8-15', 'HP: 9120 Malis Henderson Veil: S2378 sparkle tulle and rat-tail 
    edge', 'Used an 888 slip^M <<<<<<
    
    
    
     What am I doing wrong??
    
    thanks
    
    -- 
    A. R. Van Hook 
    Honeywell Federal Manufacturing & Technologies
       IT System Engineer
    City of Lake Lotawana MO
       Mayor
    pager        (816)458-2585
    cell	     (816)564-0769
    hook@kcp.com (816)997-3531
    hook@lota.us (816)578-4704
    hook@lake-lotawana.mo.us  (816)578-4215
    
    
    
    
    
    
    
  2. Re: (no subject)

    Tom Lane <tgl@sss.pgh.pa.us> — 2003-08-07T15:10:32Z

    "A. Van Hook" <hook@kcp.com> writes:
    > Dump files are used to restore and test. This test method has been used 
    > successfully on
    > all previous versions. However, in 7.3.3, when the dump utility hits a 
    > carriage return imbeded with in a text field, the
    > dump utility immeadiately jumps to the next record rendering the dump of 
    > successive records useless.
    
    AFAICT, pg_dump with -D in 7.3 and current dumps embedded carriage
    returns and newlines literally, same as it always has.  I suspect your
    problems are not actually with Postgres, but with some other tool that
    is misreading or altering the dump file.
    
    Personally, I would use pg_dump without -D.  Recent versions give a
    fairly nice behavior for embedded control characters:
    
    COPY foo (f1) FROM stdin;
    aaa\rbbb\r\nccc
    aaa\rbbb\r\nccc
    \.
    
    			regards, tom lane