diff options
author | Bruce Momjian <bruce@momjian.us> | 1998-06-16 06:42:02 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 1998-06-16 06:42:02 +0000 |
commit | 8d8bcda2531bbae665c2cbe57dade4271b0eb087 (patch) | |
tree | 1cb88a3b8fc135e89d6a070dff2244656696c90a /src/test/locale/sort-test.py | |
parent | 67a636918a85fb29333d6b3c8d576ffe62f7df9a (diff) | |
download | postgresql-8d8bcda2531bbae665c2cbe57dade4271b0eb087.tar.gz postgresql-8d8bcda2531bbae665c2cbe57dade4271b0eb087.zip |
Hello!
Attached to the mail is locale-patch.tar.gz. In the archive
there are:
file README.locale
short description
directory src/test/locale
test suite; currently only koi8-r tests, but the suite can be
easily extended
file locale.patch
the very patch; to apply: patch < locale.patch; should be applied
to postgres-6.3.2 (at least I created it with 6.3.2 without any
additional
patches)
Files touched by the patch: src/include/utils/builtins.h
src/backend/utils/adt/char.c src/backend/utils/adt/varchar.c
src/backend/utils/adt/varlena.c
Oleg
Diffstat (limited to 'src/test/locale/sort-test.py')
-rwxr-xr-x | src/test/locale/sort-test.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/test/locale/sort-test.py b/src/test/locale/sort-test.py new file mode 100755 index 00000000000..112dd2d5f75 --- /dev/null +++ b/src/test/locale/sort-test.py @@ -0,0 +1,18 @@ +#! /usr/local/bin/python + +import sys, string, locale +locale.setlocale(locale.LC_ALL, "") + +if len(sys.argv) <> 2: + sys.stderr.write("Usage: sort.py filename\n") + sys.exit(1) + +infile = open(sys.argv[1], 'r') +list = infile.readlines() +infile.close() + +for i in range(0, len(list)): + list[i] = list[i][:-1] # chop! + +list.sort(locale.strcoll) +print string.join(list, '\n') |