Kilian Koepsell <koepsell@aei-potsdam.mpg.de> writes:
>> I cannot reproduce this here --- I get Jos\\''e which is what the
>> pg_dump code is supposed to do...
> Oh, you are right. I checked it again and I also got Jos\\''e.
> But I expected to get Jos\\\' (a quoted \ -> \\ and a quoted ' -> \').
> Is '' an other possibility to quote the ' character?
Yes, in fact it is the SQL-standard-approved way. \' is not standard.
pg_dump used to use \', but I changed it to use '' in hopes of improving
compatibility with other RDBMSes.
BTW, now that I look at the code I think that it may have a bug in the
MULTIBYTE case, since pg_dump will be dealing with client-side encodings
but it is not doing anything special to handle multibyte characters.
Can any multibyte guru comment on whether it is OK or not?
regards, tom lane