David Wheeler wrote: > On Wednesday, December 11, 2002, at 04:16 PM, Bruce Momjian wrote: > > >> Hrm. So what do you reckon is the most transparent way to deal with > >> nul > >> bytes embedded in strings? > > > > Because libpq is C based, and we pass the query as a C string to the > > backend, I can not think of a way to make nulls pass transparatenly. > > Seems bytea is the only good solution, where \\0 becomes NULL. > > Yeah, but now we're talking about what to do before the string gets to > libpq. IOW, what should we do with a nul byte before we hand it off to > PostgreSQL. > > Maybe that answer is just as simple as strip it out, as Baldur suggests.
Stripping it out seems more dangerous. Perhaps we should throw an error. -- Bruce Momjian | http://candle.pha.pa.us [EMAIL PROTECTED] | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073