aboutsummaryrefslogtreecommitdiff
path: root/src/tutorial/basics.source
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2008-02-26 02:54:08 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2008-02-26 02:54:08 +0000
commitfd15dba543247eb1ce879d22632b9fdb4c230831 (patch)
tree0473586a70e4c7527f3444b59799407573bd7cf0 /src/tutorial/basics.source
parentbc93919be787ac33fb5c35ae1cfdc1bfa54e2c5c (diff)
downloadpostgresql-fd15dba543247eb1ce879d22632b9fdb4c230831.tar.gz
postgresql-fd15dba543247eb1ce879d22632b9fdb4c230831.zip
Fix encode(...bytea..., 'escape') so that it converts all high-bit-set byte
values into \nnn octal escape sequences. When the database encoding is multibyte this is *necessary* to avoid generating invalidly encoded text. Even in a single-byte encoding, the old behavior seems very hazardous --- consider for example what happens if the text is transferred to another database with a different encoding. Decoding would then yield some other bytea value than what was encoded, which is surely undesirable. Per gripe from Hernan Gonzalez. Backpatch to 8.3, but not further. This is a bit of a judgment call, but I make it on these grounds: pre-8.3 we don't really have much encoding safety anyway because of the convert() function family, and we would also have much higher risk of breaking existing apps that may not be expecting this behavior. 8.3 is still new enough that we can probably get away with making this change in the function's behavior.
Diffstat (limited to 'src/tutorial/basics.source')
0 files changed, 0 insertions, 0 deletions