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

Commit3a60edb

Browse files
committed
Merge branch 'issue-87-tests' into rel_future_beta
2 parentsb6b5a93 +78a295a commit3a60edb

File tree

2 files changed

+43
-1
lines changed

2 files changed

+43
-1
lines changed

‎expected/pathman_utility_stmt.out

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,8 +256,33 @@ SELECT * FROM copy_stmt_hooking.test ORDER BY val;
256256
6 | hash_2 | 0 | 0
257257
(2 rows)
258258

259+
/* Check dropped colums before partitioning */
260+
CREATE TABLE copy_stmt_hooking.test2 (
261+
a varchar(50),
262+
b varchar(50),
263+
t timestamp without time zone not null
264+
);
265+
ALTER TABLE copy_stmt_hooking.test2 DROP COLUMN a;
266+
SELECT create_range_partitions('copy_stmt_hooking.test2',
267+
't',
268+
'2017-01-01 00:00:00'::timestamp,
269+
interval '1 hour', 5, false
270+
);
271+
NOTICE: sequence "test2_seq" does not exist, skipping
272+
create_range_partitions
273+
-------------------------
274+
5
275+
(1 row)
276+
277+
COPY copy_stmt_hooking.test2(t) FROM stdin;
278+
SELECT COUNT(*) FROM copy_stmt_hooking.test2;
279+
count
280+
-------
281+
1
282+
(1 row)
283+
259284
DROP SCHEMA copy_stmt_hooking CASCADE;
260-
NOTICE: drop cascades to7 other objects
285+
NOTICE: drop cascades to798 other objects
261286
/*
262287
* Test auto check constraint renaming
263288
*/

‎sql/pathman_utility_stmt.sql

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,23 @@ COPY copy_stmt_hooking.test FROM stdin;
139139
SELECTcount(*)FROM ONLYcopy_stmt_hooking.test;
140140
SELECT*FROMcopy_stmt_hooking.testORDER BY val;
141141

142+
/* Check dropped colums before partitioning*/
143+
CREATETABLEcopy_stmt_hooking.test2 (
144+
avarchar(50),
145+
bvarchar(50),
146+
ttimestamp without time zonenot null
147+
);
148+
ALTERTABLEcopy_stmt_hooking.test2 DROP COLUMN a;
149+
SELECT create_range_partitions('copy_stmt_hooking.test2',
150+
't',
151+
'2017-01-01 00:00:00'::timestamp,
152+
interval'1 hour',5, false
153+
);
154+
COPYcopy_stmt_hooking.test2(t)FROM stdin;
155+
2017-02-0220:00:00
156+
\.
157+
SELECTCOUNT(*)FROMcopy_stmt_hooking.test2;
158+
142159
DROPSCHEMA copy_stmt_hooking CASCADE;
143160

144161

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp