We found a bug in the code from my first patch. Since it was a low frequency, non-destructive type of problem for us, I was able to take my time and look over the task a little more closely. Attached is a patch which should come close to implementing the TODO. In particular, it is now implemented as a configurable option, which can be set in the postgresql.conf file or at run time. There are some remaining issues:
(1) I couldn't figure out the best way to obtain a value for standard_conforming_strings in the psql version of the scanner. For our needs, could just assume it is always on, so I left it that way. Someone with a better handle on this issue can hopefully finish that part. Alternatively, if you give me some direction, I might have time to generalize it. As far as I can tell from some testing today, everything works fine issuing statements through a connection, but psql isn't settled down. (2) There should probably be some tests added to exercise these options. (3) I took a quick shot at the documentation, but I'm sure I didn't cover everything. (4) I made the changes on REL8_1_STABLE, since we need it now. This patch is relative to that branch, not the trunk. I hope this is helpful. If there's anything I should have done differently, please let me know, so I can try to do better next time. -Kevin >>> On Fri, Dec 9, 2005 at 11:23 am, in message <[EMAIL PROTECTED]>, Bruce Momjian <pgman@candle.pha.pa.us> wrote: > I think we we will be turning on escape_string_warning in 8.2 and allow > standard_conforming_strings to be optionally turned on in that releaes. > I will keep the patch for us in completing that item. > > This has been saved for the 8.2 release: > > http://momjian.postgresql.org/cgi- bin/pgpatches_hold
configurable-unified-patch.txt
Description: Binary data
---------------------------(end of broadcast)--------------------------- TIP 6: explain analyze is your friend