diff options
author | Andrew Dunstan <andrew@dunslane.net> | 2007-09-18 17:41:17 +0000 |
---|---|---|
committer | Andrew Dunstan <andrew@dunslane.net> | 2007-09-18 17:41:17 +0000 |
commit | 55613bf9cd7d6071e43e68ac14bc0243a1027507 (patch) | |
tree | 9b151f94d94e7dc3aa5988c03867d3f6f6b562ba /src/backend/access/gist/gist.c | |
parent | 8544110042ddf8be29e177e37f53516686a06da2 (diff) | |
download | postgresql-55613bf9cd7d6071e43e68ac14bc0243a1027507.tar.gz postgresql-55613bf9cd7d6071e43e68ac14bc0243a1027507.zip |
Close previously open holes for invalidly encoded data to enter the
database via builtin functions, as recently discussed on -hackers.
chr() now returns a character in the database encoding. For UTF8 encoded databases
the argument is treated as a Unicode code point. For other multi-byte encodings
the argument must designate a strict ascii character, or an error is raised,
as is also the case if the argument is 0.
ascii() is adjusted so that it remains the inverse of chr().
The two argument form of convert() is gone, and the three argument form now
takes a bytea first argument and returns a bytea. To cover this loss three new
functions are introduced:
. convert_from(bytea, name) returns text - converts the first argument from the
named encoding to the database encoding
. convert_to(text, name) returns bytea - converts the first argument from the
database encoding to the named encoding
. length(bytea, name) returns int - gives the length of the first argument in
characters in the named encoding
Diffstat (limited to 'src/backend/access/gist/gist.c')
0 files changed, 0 insertions, 0 deletions