projects
/
users
/
bernd
/
postgres.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
260a4b6
)
Fix thinko in encoding check for chr()
author
Andrew Dunstan
<
[email protected]
>
Tue, 18 Dec 2007 18:01:48 +0000
(18:01 +0000)
committer
Andrew Dunstan
<
[email protected]
>
Tue, 18 Dec 2007 18:01:48 +0000
(18:01 +0000)
src/backend/utils/adt/oracle_compat.c
patch
|
blob
|
blame
|
history
diff --git
a/src/backend/utils/adt/oracle_compat.c
b/src/backend/utils/adt/oracle_compat.c
index feca491c920b38541c5c284a25efdd3044c5150e..6e6fbffd9124ba89525cc0e8f96a0ef4a560e0f0 100644
(file)
--- a/
src/backend/utils/adt/oracle_compat.c
+++ b/
src/backend/utils/adt/oracle_compat.c
@@
-1423,7
+1423,7
@@
chr (PG_FUNCTION_ARGS)
is_mb = pg_encoding_max_length(encoding) > 1;
- if ((is_mb && (cvalue >
255)) || (!is_mb && (cvalue > 127
)))
+ if ((is_mb && (cvalue >
127)) || (!is_mb && (cvalue > 255
)))
ereport(ERROR,
(errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED),
errmsg("requested character too large for encoding: %d",