Changeset: 19cf35d63c0a for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=19cf35d63c0a Modified Files: sql/test/pg_regress/Tests/oid.sql sql/test/pg_regress/Tests/oid.stable.err sql/test/pg_regress/Tests/oid.stable.out Branch: default Log Message:
Extended oid tests (with @0 suffix values) and approved new output. diffs (216 lines): diff --git a/sql/test/pg_regress/Tests/oid.sql b/sql/test/pg_regress/Tests/oid.sql --- a/sql/test/pg_regress/Tests/oid.sql +++ b/sql/test/pg_regress/Tests/oid.sql @@ -35,24 +35,30 @@ INSERT INTO OID_TBL(f1) VALUES (-2358235 SELECT '' AS ten, OID_TBL.*, cast(f1 as varchar(30)) as oid2str FROM OID_TBL ORDER BY f1; -DELETE FROM OID_TBL WHERE f1 = -1040; +DELETE FROM OID_TBL WHERE f1 < '0'; SELECT '' AS one, o.*, cast(f1 as varchar(30)) as oid2str FROM OID_TBL o WHERE o.f1 = 1234; +SELECT '' AS one, o.*, cast(f1 as varchar(30)) as oid2str FROM OID_TBL o WHERE o.f1 = 1234@0; SELECT '' AS one, o.*, cast(f1 as varchar(30)) as oid2str FROM OID_TBL o WHERE o.f1 = '1234'; SELECT '' AS seven, o.*, cast(f1 as varchar(30)) as oid2str FROM OID_TBL o WHERE o.f1 <> 1234; +SELECT '' AS seven, o.*, cast(f1 as varchar(30)) as oid2str FROM OID_TBL o WHERE o.f1 <> 1234@0; SELECT '' AS seven, o.*, cast(f1 as varchar(30)) as oid2str FROM OID_TBL o WHERE o.f1 <> '1234'; SELECT '' AS six, o.*, cast(f1 as varchar(30)) as oid2str FROM OID_TBL o WHERE o.f1 <= 1234; +SELECT '' AS six, o.*, cast(f1 as varchar(30)) as oid2str FROM OID_TBL o WHERE o.f1 <= 1234@0; SELECT '' AS six, o.*, cast(f1 as varchar(30)) as oid2str FROM OID_TBL o WHERE o.f1 <= '1234'; SELECT '' AS five, o.*, cast(f1 as varchar(30)) as oid2str FROM OID_TBL o WHERE o.f1 < 1234; +SELECT '' AS five, o.*, cast(f1 as varchar(30)) as oid2str FROM OID_TBL o WHERE o.f1 < 1234@0; SELECT '' AS five, o.*, cast(f1 as varchar(30)) as oid2str FROM OID_TBL o WHERE o.f1 < '1234'; SELECT '' AS three, o.*, cast(f1 as varchar(30)) as oid2str FROM OID_TBL o WHERE o.f1 >= 1234; +SELECT '' AS three, o.*, cast(f1 as varchar(30)) as oid2str FROM OID_TBL o WHERE o.f1 >= 1234@0; SELECT '' AS three, o.*, cast(f1 as varchar(30)) as oid2str FROM OID_TBL o WHERE o.f1 >= '1234'; SELECT '' AS two, o.*, cast(f1 as varchar(30)) as oid2str FROM OID_TBL o WHERE o.f1 > 1234; +SELECT '' AS two, o.*, cast(f1 as varchar(30)) as oid2str FROM OID_TBL o WHERE o.f1 > 1234@0; SELECT '' AS two, o.*, cast(f1 as varchar(30)) as oid2str FROM OID_TBL o WHERE o.f1 > '1234'; DROP TABLE OID_TBL; diff --git a/sql/test/pg_regress/Tests/oid.stable.err b/sql/test/pg_regress/Tests/oid.stable.err --- a/sql/test/pg_regress/Tests/oid.stable.err +++ b/sql/test/pg_regress/Tests/oid.stable.err @@ -29,64 +29,61 @@ stderr of test 'oid` in directory 'sql/t # 15:18:43 > "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e" "--host=/var/tmp/mtest-7372" "--port=31804" # 15:18:43 > -MAPI = (monetdb) /var/tmp/mtest-23578/.s.monetdb.35972 +MAPI = (monetdb) /var/tmp/mtest-26840/.s.monetdb.37388 QUERY = INSERT INTO OID_TBL(f1) VALUES ('asdfasd'); ERROR = !conversion of string 'asdfasd' to type oid failed. -MAPI = (monetdb) /var/tmp/mtest-23578/.s.monetdb.35972 +MAPI = (monetdb) /var/tmp/mtest-26840/.s.monetdb.37388 QUERY = INSERT INTO OID_TBL(f1) VALUES ('99asdfasd'); ERROR = !conversion of string '99asdfasd' to type oid failed. -MAPI = (monetdb) /var/tmp/mtest-23578/.s.monetdb.35972 +MAPI = (monetdb) /var/tmp/mtest-26840/.s.monetdb.37388 QUERY = INSERT INTO OID_TBL(f1) VALUES ('5 d'); ERROR = !conversion of string '5 d' to type oid failed. -MAPI = (monetdb) /var/tmp/mtest-23578/.s.monetdb.35972 +MAPI = (monetdb) /var/tmp/mtest-26840/.s.monetdb.37388 QUERY = INSERT INTO OID_TBL(f1) VALUES (' 5d'); ERROR = !conversion of string ' 5d' to type oid failed. -MAPI = (monetdb) /var/tmp/mtest-23578/.s.monetdb.35972 +MAPI = (monetdb) /var/tmp/mtest-26840/.s.monetdb.37388 QUERY = INSERT INTO OID_TBL(f1) VALUES ('5 5'); ERROR = !conversion of string '5 5' to type oid failed. -MAPI = (monetdb) /var/tmp/mtest-23578/.s.monetdb.35972 +MAPI = (monetdb) /var/tmp/mtest-26840/.s.monetdb.37388 QUERY = INSERT INTO OID_TBL(f1) VALUES (-10); -- negative oids are not allowed in MonetDB, so this should fail ERROR = !overflow in conversion of -10 to oid. -MAPI = (monetdb) /var/tmp/mtest-23578/.s.monetdb.35972 +MAPI = (monetdb) /var/tmp/mtest-26840/.s.monetdb.37388 QUERY = INSERT INTO OID_TBL(f1) VALUES (-1040); -- negative oids are not allowed in MonetDB, so this should fail ERROR = !overflow in conversion of -1040 to oid. -MAPI = (monetdb) /var/tmp/mtest-23578/.s.monetdb.35972 +MAPI = (monetdb) /var/tmp/mtest-26840/.s.monetdb.37388 QUERY = INSERT INTO OID_TBL(f1) VALUES ('-1040'); -- negative oids are not allowed in MonetDB, so this should fail ERROR = !conversion of string '-1040' to type oid failed. -MAPI = (monetdb) /var/tmp/mtest-23578/.s.monetdb.35972 +MAPI = (monetdb) /var/tmp/mtest-26840/.s.monetdb.37388 QUERY = INSERT INTO OID_TBL(f1) VALUES (' - 500'); ERROR = !conversion of string ' - 500' to type oid failed. -MAPI = (monetdb) /var/tmp/mtest-23578/.s.monetdb.35972 +MAPI = (monetdb) /var/tmp/mtest-26840/.s.monetdb.37388 QUERY = INSERT INTO OID_TBL(f1) VALUES ('32958209582039852935'); ERROR = !conversion of string '32958209582039852935' to type oid failed. -MAPI = (monetdb) /var/tmp/mtest-23578/.s.monetdb.35972 +MAPI = (monetdb) /var/tmp/mtest-26840/.s.monetdb.37388 QUERY = INSERT INTO OID_TBL(f1) VALUES (32958209582039852935); ERROR = !overflow in conversion of 32958209582039851008 to lng. -MAPI = (monetdb) /var/tmp/mtest-23578/.s.monetdb.35972 +MAPI = (monetdb) /var/tmp/mtest-26840/.s.monetdb.37388 QUERY = INSERT INTO OID_TBL(f1) VALUES ('-23582358720398502385'); ERROR = !conversion of string '-23582358720398502385' to type oid failed. -MAPI = (monetdb) /var/tmp/mtest-23578/.s.monetdb.35972 +MAPI = (monetdb) /var/tmp/mtest-26840/.s.monetdb.37388 QUERY = INSERT INTO OID_TBL(f1) VALUES (-23582358720398502385); ERROR = !overflow in conversion of -23582358720398503936 to lng. -MAPI = (monetdb) /var/tmp/mtest-23578/.s.monetdb.35972 -QUERY = DELETE FROM OID_TBL WHERE f1 = -1040; -ERROR = !overflow in conversion of 12345678901 to sht. -MAPI = (monetdb) /var/tmp/mtest-23578/.s.monetdb.35972 +MAPI = (monetdb) /var/tmp/mtest-26840/.s.monetdb.37388 QUERY = SELECT '' AS one, o.*, cast(f1 as varchar(30)) as oid2str FROM OID_TBL o WHERE o.f1 = 1234; ERROR = !overflow in conversion of 12345678901 to sht. -MAPI = (monetdb) /var/tmp/mtest-23578/.s.monetdb.35972 +MAPI = (monetdb) /var/tmp/mtest-26840/.s.monetdb.37388 QUERY = SELECT '' AS seven, o.*, cast(f1 as varchar(30)) as oid2str FROM OID_TBL o WHERE o.f1 <> 1234; ERROR = !overflow in conversion of 12345678901 to sht. -MAPI = (monetdb) /var/tmp/mtest-23578/.s.monetdb.35972 +MAPI = (monetdb) /var/tmp/mtest-26840/.s.monetdb.37388 QUERY = SELECT '' AS six, o.*, cast(f1 as varchar(30)) as oid2str FROM OID_TBL o WHERE o.f1 <= 1234; ERROR = !overflow in conversion of 12345678901 to sht. -MAPI = (monetdb) /var/tmp/mtest-23578/.s.monetdb.35972 +MAPI = (monetdb) /var/tmp/mtest-26840/.s.monetdb.37388 QUERY = SELECT '' AS five, o.*, cast(f1 as varchar(30)) as oid2str FROM OID_TBL o WHERE o.f1 < 1234; ERROR = !overflow in conversion of 12345678901 to sht. -MAPI = (monetdb) /var/tmp/mtest-23578/.s.monetdb.35972 +MAPI = (monetdb) /var/tmp/mtest-26840/.s.monetdb.37388 QUERY = SELECT '' AS three, o.*, cast(f1 as varchar(30)) as oid2str FROM OID_TBL o WHERE o.f1 >= 1234; ERROR = !overflow in conversion of 12345678901 to sht. -MAPI = (monetdb) /var/tmp/mtest-23578/.s.monetdb.35972 +MAPI = (monetdb) /var/tmp/mtest-26840/.s.monetdb.37388 QUERY = SELECT '' AS two, o.*, cast(f1 as varchar(30)) as oid2str FROM OID_TBL o WHERE o.f1 > 1234; ERROR = !overflow in conversion of 12345678901 to sht. diff --git a/sql/test/pg_regress/Tests/oid.stable.out b/sql/test/pg_regress/Tests/oid.stable.out --- a/sql/test/pg_regress/Tests/oid.stable.out +++ b/sql/test/pg_regress/Tests/oid.stable.out @@ -78,6 +78,14 @@ Ready. [ "", 1234@0, "1234@0" ] [ "", 1235@0, "1235@0" ] [ "", 12345678901@0, "12345678901@0" ] +#DELETE FROM OID_TBL WHERE f1 < '0'; +[ 0 ] +#SELECT '' AS one, o.*, cast(f1 as varchar(30)) as oid2str FROM OID_TBL o WHERE o.f1 = 1234@0; +% .L, sys.o, sys.L1 # table_name +% one, f1, oid2str # name +% char, oid, varchar # type +% 0, 6, 6 # length +[ "", 1234@0, "1234@0" ] #SELECT '' AS one, o.*, cast(f1 as varchar(30)) as oid2str FROM OID_TBL o WHERE o.f1 = '1234'; % .L, sys.o, sys.L1 # table_name % one, f1, oid2str # name @@ -98,25 +106,52 @@ Ready. [ "", 15@0, "15@0" ] #SELECT '' AS six, o.*, cast(f1 as varchar(30)) as oid2str FROM OID_TBL o WHERE o.f1 <= '1234'; % .L, sys.o, sys.L1 # table_name +% seven, f1, oid2str # name +% char, oid, varchar # type +% 0, 13, 13 # length +[ "", 1235@0, "1235@0" ] +[ "", 987@0, "987@0" ] +[ "", 12345678901@0, "12345678901@0" ] +[ "", 0@0, "0@0" ] +[ "", 5@0, "5@0" ] +[ "", 10@0, "10@0" ] +[ "", 15@0, "15@0" ] +#SELECT '' AS six, o.*, cast(f1 as varchar(30)) as oid2str FROM OID_TBL o WHERE o.f1 <= 1234@0; +% .L, sys.o, sys.L1 # table_name % six, f1, oid2str # name % char, oid, varchar # type -% 0, 6, 6 # length -[ "", 1234@0, "1234@0" ] -[ "", 987@0, "987@0" ] -[ "", 0@0, "0@0" ] -[ "", 5@0, "5@0" ] +% 0, 4, 4 # length +[ "", 10@0, "10@0" ] +[ "", 15@0, "15@0" ] +#SELECT '' AS six, o.*, cast(f1 as varchar(30)) as oid2str FROM OID_TBL o WHERE o.f1 <= '1234'; +% .L, sys.o, sys.L1 # table_name +% six, f1, oid2str # name +% char, oid, varchar # type +% 0, 4, 4 # length +[ "", 10@0, "10@0" ] +[ "", 15@0, "15@0" ] +#SELECT '' AS five, o.*, cast(f1 as varchar(30)) as oid2str FROM OID_TBL o WHERE o.f1 < 1234@0; +% .L, sys.o, sys.L1 # table_name +% five, f1, oid2str # name +% char, oid, varchar # type +% 0, 4, 4 # length [ "", 10@0, "10@0" ] [ "", 15@0, "15@0" ] #SELECT '' AS five, o.*, cast(f1 as varchar(30)) as oid2str FROM OID_TBL o WHERE o.f1 < '1234'; % .L, sys.o, sys.L1 # table_name % five, f1, oid2str # name % char, oid, varchar # type -% 0, 5, 5 # length -[ "", 987@0, "987@0" ] -[ "", 0@0, "0@0" ] -[ "", 5@0, "5@0" ] +% 0, 4, 4 # length [ "", 10@0, "10@0" ] [ "", 15@0, "15@0" ] +#SELECT '' AS three, o.*, cast(f1 as varchar(30)) as oid2str FROM OID_TBL o WHERE o.f1 >= 1234@0; +% .L, sys.o, sys.L1 # table_name +% three, f1, oid2str # name +% char, oid, varchar # type +% 0, 13, 13 # length +[ "", 1234@0, "1234@0" ] +[ "", 1235@0, "1235@0" ] +[ "", 12345678901@0, "12345678901@0" ] #SELECT '' AS three, o.*, cast(f1 as varchar(30)) as oid2str FROM OID_TBL o WHERE o.f1 >= '1234'; % .L, sys.o, sys.L1 # table_name % three, f1, oid2str # name @@ -125,6 +160,13 @@ Ready. [ "", 1234@0, "1234@0" ] [ "", 1235@0, "1235@0" ] [ "", 12345678901@0, "12345678901@0" ] +#SELECT '' AS two, o.*, cast(f1 as varchar(30)) as oid2str FROM OID_TBL o WHERE o.f1 > 1234@0; +% .L, sys.o, sys.L1 # table_name +% two, f1, oid2str # name +% char, oid, varchar # type +% 0, 13, 13 # length +[ "", 1235@0, "1235@0" ] +[ "", 12345678901@0, "12345678901@0" ] #SELECT '' AS two, o.*, cast(f1 as varchar(30)) as oid2str FROM OID_TBL o WHERE o.f1 > '1234'; % .L, sys.o, sys.L1 # table_name % two, f1, oid2str # name _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list