Update of /cvsroot/monetdb/sql/src/test/pg_regress/Tests
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv15478/Tests
Added Files:
strings_cast.SQL.sh strings_cast.stable.err
strings_cast.stable.out
Log Message:
Add cast test, we basically do it good, I think, we just don't support all the
possible syntax cases of aliases and stuff
--- NEW FILE: strings_cast.stable.out ---
stdout of test 'strings_cast` in directory 'src/test/pg_regress` itself:
# 22:34:06 >
# 22:34:06 > mserver5
"--config=/export/scratch/stripe/fabian/monetdb/current/program-i86pc/etc/monetdb5.conf"
--debug=10 --set gdk_nr_threads=0 --set
"monet_mod_path=/export/scratch/stripe/fabian/monetdb/current/program-i86pc/lib/MonetDB5:/export/scratch/stripe/fabian/monetdb/current/program-i86pc/lib/MonetDB5/lib:/export/scratch/stripe/fabian/monetdb/current/program-i86pc/lib/MonetDB5/bin"
--set
"gdk_dbfarm=/export/scratch/stripe/fabian/monetdb/current/mtest-pegasus.ins.cwi.nl/sql/dbfarm"
--set mapi_open=true --set xrpc_open=true --set mapi_port=34030 --set
xrpc_port=44789 --set monet_prompt= --trace
"--dbname=mTests_src_test_pg_regress" --set mal_listing=0 "--dbinit= include
sql;" ; echo ; echo Over..
# 22:34:06 >
# MonetDB server v5.13.0, based on kernel v1.31.0
# Serving database 'mTests_src_test_pg_regress', using 1 thread
# Compiled for x86_64-pc-solaris2.11/64bit with 64bit OIDs dynamically linked
# Copyright (c) 1993-July 2008 CWI.
# Copyright (c) August 2008-2009 MonetDB B.V., all rights reserved
# Visit http://monetdb.cwi.nl/ for further information
# Listening for connection requests on mapi:monetdb://pegasus.ins.cwi.nl:34030/
# MonetDB/SQL module v2.31.0 loaded
Ready.
#function user.main():void;
# clients.quit();
#end main;
Over..
# 22:34:06 >
# 22:34:06 > ./strings_cast.SQL.sh strings_cast
# 22:34:06 >
# 22:34:06 >
# 22:34:06 > Mtimeout -timeout 60 mclient -lsql -umonetdb -Pmonetdb
--host=pegasus --port=34030 -e <
../../../../../../../../../../mirror/fabian/monetdb/current/sql/src/test/pg_regress/Tests/../monetdb/strings_cast.sql
# 22:34:06 >
#--
#-- STRINGS
#-- Test various data entry syntaxes.
#--
#--
#-- test conversions between various string types
#-- E021-10 implicit casting among the character data types
#--
#SELECT CAST(f1 AS text) AS "text(char)" FROM CHAR_TBL;
% sys. # table_name
% text(char) # name
% clob # type
% 4 # length
[ "a" ]
[ "ab" ]
[ "abcd" ]
#SELECT CAST(f1 AS text) AS "text(varchar)" FROM VARCHAR_TBL;
% sys. # table_name
% text(varchar) # name
% clob # type
% 4 # length
[ "a" ]
[ "ab" ]
[ "abcd" ]
#SELECT CAST(name 'namefield' AS text) AS "text(name)";
#-- since this is an explicit cast, it should truncate w/o error:
#SELECT CAST(f1 AS char(10)) AS "char(text)" FROM TEXT_TBL;
% sys. # table_name
% char(text) # name
% char # type
% 10 # length
[ "doh!" ]
[ "hi de ho n" ]
#-- note: implicit-cast case is tested in char.sql
#SELECT CAST(f1 AS char(20)) AS "char(text)" FROM TEXT_TBL;
% sys. # table_name
% char(text) # name
% char # type
% 20 # length
[ "doh!" ]
[ "hi de ho neighbor" ]
#SELECT CAST(f1 AS char(10)) AS "char(varchar)" FROM VARCHAR_TBL;
% sys. # table_name
% char(varchar) # name
% char # type
% 10 # length
[ "a" ]
[ "ab" ]
[ "abcd" ]
#SELECT CAST(name 'namefield' AS char(10)) AS "char(name)";
#SELECT CAST(f1 AS varchar) AS "varchar(text)" FROM TEXT_TBL;
#SELECT CAST(f1 AS varchar) AS "varchar(char)" FROM CHAR_TBL;
#SELECT CAST(name 'namefield' AS varchar) AS "varchar(name)";
# 22:34:06 >
# 22:34:06 > Done.
# 22:34:06 >
--- NEW FILE: strings_cast.stable.err ---
stderr of test 'strings_cast` in directory 'src/test/pg_regress` itself:
# 22:34:06 >
# 22:34:06 > mserver5
"--config=/export/scratch/stripe/fabian/monetdb/current/program-i86pc/etc/monetdb5.conf"
--debug=10 --set gdk_nr_threads=0 --set
"monet_mod_path=/export/scratch/stripe/fabian/monetdb/current/program-i86pc/lib/MonetDB5:/export/scratch/stripe/fabian/monetdb/current/program-i86pc/lib/MonetDB5/lib:/export/scratch/stripe/fabian/monetdb/current/program-i86pc/lib/MonetDB5/bin"
--set
"gdk_dbfarm=/export/scratch/stripe/fabian/monetdb/current/mtest-pegasus.ins.cwi.nl/sql/dbfarm"
--set mapi_open=true --set xrpc_open=true --set mapi_port=34030 --set
xrpc_port=44789 --set monet_prompt= --trace
"--dbname=mTests_src_test_pg_regress" --set mal_listing=0 "--dbinit= include
sql;" ; echo ; echo Over..
# 22:34:06 >
# builtin opt gdk_arch = 64bitx86_64-pc-solaris2.11
# builtin opt gdk_version = 1.31.0
# builtin opt prefix =
/export/scratch/stripe/fabian/monetdb/current/program-i86pc
# builtin opt exec_prefix = ${prefix}
# builtin opt gdk_dbname = tst
# builtin opt gdk_dbfarm = ${prefix}/var/MonetDB
# builtin opt gdk_debug = 8
# builtin opt gdk_alloc_map = yes
# builtin opt gdk_vmtrim = yes
# builtin opt monet_admin = adm
# builtin opt monet_prompt = >
# builtin opt monet_welcome = yes
# builtin opt monet_mod_path =
/export/scratch/stripe/fabian/monetdb/current/program-i86pc/lib/MonetDB
# builtin opt monet_daemon = yes
# builtin opt host = localhost
# builtin opt mapi_port = 50000
# builtin opt mapi_noheaders = no
# builtin opt mapi_debug = 0
# builtin opt mapi_clients = 2
# builtin opt sql_debug = 0
# builtin opt sql_logdir = sql_logs
# builtin opt xquery_logdir = xquery_logs
# builtin opt standoff_ns = http://monetdb.cwi.nl/standoff
# builtin opt standoff_start = start
# builtin opt standoff_end = end
# config opt prefix =
/export/scratch/stripe/fabian/monetdb/current/program-i86pc
# config opt config = ${prefix}/etc/monetdb5.conf
# config opt prefix =
/export/scratch/stripe/fabian/monetdb/current/program-i86pc
# config opt exec_prefix = ${prefix}
# config opt gdk_dbfarm = ${prefix}/var/MonetDB5/dbfarm
# config opt gdk_dbname = demo
# config opt gdk_alloc_map = no
# config opt gdk_embedded = no
# config opt gdk_debug = 0
# config opt monet_mod_path =
/export/scratch/stripe/fabian/monetdb/current/program-i86pc/lib/MonetDB5:/export/scratch/stripe/fabian/monetdb/current/program-i86pc/lib/MonetDB5/lib:/export/scratch/stripe/fabian/monetdb/current/program-i86pc/lib/MonetDB5/bin
# config opt monet_daemon = no
# config opt monet_welcome = yes
# config opt mero_msglog = ${prefix}/var/log/MonetDB/merovingian.log
# config opt mero_errlog = ${prefix}/var/log/MonetDB/merovingian.log
# config opt mero_pidfile = ${prefix}/var/run/MonetDB/merovingian.pid
# config opt mal_init =
/export/scratch/stripe/fabian/monetdb/current/program-i86pc/lib/MonetDB5/mal_init.mal
# config opt mal_listing = 2
# config opt mapi_port = 50000
# config opt mapi_autosense = false
# config opt mapi_open = false
# config opt sql_optimizer =
inline,remap,evaluate,costModel,coercions,emptySet,cluster,aliases,mergetable,deadcode,constants,commonTerms,joinPath,deadcode,reduce,garbageCollector,dataflow,history,multiplex
# cmdline opt config =
/export/scratch/stripe/fabian/monetdb/current/program-i86pc/etc/monetdb5.conf
# cmdline opt gdk_nr_threads = 0
# cmdline opt monet_mod_path =
/export/scratch/stripe/fabian/monetdb/current/program-i86pc/lib/MonetDB5:/export/scratch/stripe/fabian/monetdb/current/program-i86pc/lib/MonetDB5/lib:/export/scratch/stripe/fabian/monetdb/current/program-i86pc/lib/MonetDB5/bin
# cmdline opt gdk_dbfarm =
/export/scratch/stripe/fabian/monetdb/current/mtest-pegasus.ins.cwi.nl/sql/dbfarm
# cmdline opt mapi_open = true
# cmdline opt xrpc_open = true
# cmdline opt mapi_port = 34030
# cmdline opt xrpc_port = 44789
# cmdline opt monet_prompt =
# cmdline opt gdk_dbname = mTests_src_test_pg_regress
# cmdline opt mal_listing = 0
#warning: please don't forget to set your vault key!
#(see
/export/scratch/stripe/fabian/monetdb/current/program-i86pc/etc/monetdb5.conf)
# 22:34:06 >
# 22:34:06 > ./strings_cast.SQL.sh strings_cast
# 22:34:06 >
# 22:34:06 >
# 22:34:06 > Mtimeout -timeout 60 mclient -lsql -umonetdb -Pmonetdb
--host=pegasus --port=34030 -e <
../../../../../../../../../../mirror/fabian/monetdb/current/sql/src/test/pg_regress/Tests/../monetdb/strings_cast.sql
# 22:34:06 >
MAPI = mone...@pegasus:34030
QUERY = SELECT CAST(name 'namefield' AS text) AS "text(name)";
ERROR = !syntax error, unexpected STRING, expecting AS in: "select cast(name
'namefield'"
MAPI = mone...@pegasus:34030
QUERY = SELECT CAST(name 'namefield' AS char(10)) AS "char(name)";
ERROR = !syntax error, unexpected STRING, expecting AS in: "select cast(name
'namefield'"
MAPI = mone...@pegasus:34030
QUERY = SELECT CAST(f1 AS varchar) AS "varchar(text)" FROM TEXT_TBL;
ERROR = !CHARACTER VARYING needs a mandatory length specification in: "select
cast(f1 as varchar)"
!syntax error, unexpected AS in: "as"
MAPI = mone...@pegasus:34030
QUERY = SELECT CAST(f1 AS varchar) AS "varchar(char)" FROM CHAR_TBL;
ERROR = !CHARACTER VARYING needs a mandatory length specification in: "select
cast(f1 as varchar)"
!syntax error, unexpected AS in: "as"
MAPI = mone...@pegasus:34030
QUERY = SELECT CAST(name 'namefield' AS varchar) AS "varchar(name)";
ERROR = !syntax error, unexpected STRING, expecting AS in: "select cast(name
'namefield'"
# 22:34:06 >
# 22:34:06 > Done.
# 22:34:06 >
--- NEW FILE: strings_cast.SQL.sh ---
#!/usr/bin/env bash
Mlog -x "$SQL_CLIENT -e < $RELSRCDIR/../monetdb/$TST.sql"
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Monetdb-sql-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-sql-checkins