runall
来自「postgresql8.3.4源码,开源数据库」· 代码 · 共 47 行
TXT
47 行
#! /bin/shPATH=..:$PATHecho "Testing PostgreSQL compilation..."LC_CTYPE=ru_RU.KOI8-RLC_COLLATE=$LC_CTYPEexport LC_CTYPE LC_COLLATEPGCLIENTENCODING=winexport PGCLIENTENCODINGecho "Testing LC_COLLATE..."perl ../sort-test.pl test-koi8-sort.in > test-koi8-sort.outdiff expected/test-koi8-sort.out test-koi8-sort.out### If you have Python - uncomment the following two lines#python ../sort-test.py test-koi8-sort.in > test-koi8-sort.out#diff expected/test-koi8-sort.out test-koi8-sort.outabort() { [ "$1" ] && echo "$*" exit 1}for f in char varchar text; do if echo $f | grep -q char; then ftype="$f(60)" else ftype="$f" fi echo "Testing PgSQL: sort on $ftype type..." dropdb testlocale >/dev/null 2>&1 createdb testlocale || abort "createdb failed" psql -d testlocale -c "CREATE TABLE usastates (abbrev char(2), name_en char(20), name_ru $ftype);" >/dev/null 2>&1 || abort "createtable failed" psql testlocale < test-koi8.sql.in > test-koi8-$f.sql.out 2>/dev/null || abort "test query failed" diff expected/test-koi8-$f.sql.out test-koi8-$f.sql.outdoneecho "Testing PgSQL: select on regexp..."psql testlocale < test-koi8-select.sql.in > test-koi8-select.sql.out 2>/dev/null || abort "select query failed"diff expected/test-koi8-select.sql.out test-koi8-select.sql.outdropdb testlocale || abort "dropdb failed"echo "Finished."
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?