slony1-bugs at lists.slony.info slony1-bugs at lists.slony.info
Mon Oct 13 09:15:44 PDT 2008
http://www.slony.info/bugzilla/show_bug.cgi?id=59

           Summary: slony doesn't escape varchar fields properly, making it
                    impossible to replicate varchar or bytea columns in some
                    cases
           Product: Slony-I
           Version: 1.2
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: critical
          Priority: medium
         Component: slon
        AssignedTo: slony1-bugs at lists.slony.info
        ReportedBy: gj at zlew.org
                CC: slony1-bugs at lists.slony.info
   Estimated Hours: 0.0


I have a very simple table:

create table foo(z varchar not null, bar int not null, primary key(z));

now, I try to insert bunch of data to it using:
insert into foo(bar, z) select generate_series(1,100) as bar, encode(
gen_random_bytes(100), 'escape') as z;

on slon's insert db will reply:
ERROR:  invalid byte sequence for encoding "UTF8": 0xdf15

which is quite right, since data is not escaped. I am inserting random data, on
purpose - because we do have that in here, and it works fine with my C code,
that so far replicated the data.

Further more, I think if slony would use PQexecParams instead of PQexec to
insert data, that problem wouldn't arose in first place.


-- 
Configure bugmail: http://www.slony.info/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
You are the assignee for the bug.


More information about the Slony1-bugs mailing list