5 echo "Testing PostgreSQL compilation..."
7 LC_CTYPE
=gr_GR.ISO8859-7
9 export LC_CTYPE LC_COLLATE
11 echo "Testing LC_CTYPE..."
12 if ! test-ctype
> gr-ctype.out
; then
15 diff expected
/gr-ctype.out gr-ctype.out
17 echo "Testing LC_COLLATE..."
18 perl ..
/sort-test.pl test-gr-sort.
in > test-gr-sort.out
19 diff expected
/test-gr-sort.out test-gr-sort.out
21 ### If you have Python - uncomment the following two lines
22 #python ../sort-test.py test-gr-sort.in > test-gr-sort.out
23 #diff expected/test-gr-sort.out test-gr-sort.out
31 for f
in char varchar text
; do
32 if echo $f |
grep -q char
; then
37 echo "Testing PgSQL: sort on $ftype type..."
39 dropdb testlocale
>/dev
/null
2>&1
40 createdb testlocale || abort
"createdb failed"
41 psql
-X -d testlocale
-c "CREATE TABLE usastates (abbrev char(2), name_en char(20), name_gr $ftype);" >/dev
/null
2>&1 || abort
"createtable failed"
42 psql
-X testlocale
< test-gr.sql.
in > test-gr-
$f.sql.out
2>/dev
/null || abort
"test query failed"
43 diff expected
/test-gr-
$f.sql.out test-gr-
$f.sql.out
45 echo "Testing PgSQL: select on regexp..."
46 psql
-X testlocale
< test-gr-select.sql.
in > test-gr-select.sql.out
2>/dev
/null || abort
"select query failed"
47 diff expected
/test-gr-select.sql.out test-gr-select.sql.out
48 dropdb testlocale || abort
"dropdb failed"