Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitafbb3c1

Browse files
committed
resolve conflicts caused by merge of branch 'master', improve tests for NOT operator
2 parentsfa1429e +d586756 commitafbb3c1

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

‎sql/pathman_basic.sql

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ SELECT count(*) FROM test.insert_into_select_copy;
101101
DROPTABLEtest.insert_into_select_copy,test.insert_into_select CASCADE;
102102

103103

104-
/*test special case: ONLY statement with not-ONLY for partitioned table*/
104+
/*Test special case: ONLY statement with not-ONLY for partitioned table*/
105105
CREATETABLEtest.from_only_test(valINTNOT NULL);
106106
INSERT INTOtest.from_only_testSELECT generate_series(1,20);
107107
SELECTpathman.create_range_partitions('test.from_only_test','val',1,2);
@@ -469,6 +469,16 @@ SELECT drop_partitions('test.range_rel', TRUE);
469469
SELECT create_partitions_from_range('test.range_rel','dt','2015-01-01'::date,'2015-12-01'::date,'1 month'::interval);
470470
EXPLAIN (COSTS OFF)SELECT*FROMtest.range_relWHERE dt='2015-12-15';
471471

472+
/* Test NOT operator*/
473+
CREATETABLEbool_test(aINTNOT NULL, bBOOLEAN);
474+
SELECT create_hash_partitions('bool_test','a',3);
475+
INSERT INTO bool_testSELECT g, (g %4)=0FROM generate_series(1,100)AS g;
476+
SELECTcount(*)FROM bool_test;
477+
SELECTcount(*)FROM bool_testWHERE (b= trueAND b= false);
478+
SELECTcount(*)FROM bool_testWHERE b= false;/* 75 values*/
479+
SELECTcount(*)FROM bool_testWHERE b= true;/* 25 values*/
480+
DROPTABLE bool_test CASCADE;
481+
472482
/* Test foreign keys*/
473483
CREATETABLEtest.messages(idSERIALPRIMARY KEY, msgTEXT);
474484
CREATETABLEtest.replies(idSERIALPRIMARY KEY, message_idINTEGERREFERENCEStest.messages(id), msgTEXT);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp