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

Commit46aae59

Browse files
committed
Fix sequence test in cs_CZ locale
Rename some objects so that sorted output becomes less locale-dependent.
1 parentd711532 commit46aae59

File tree

2 files changed

+22
-22
lines changed

2 files changed

+22
-22
lines changed

‎src/test/regress/expected/sequence.out

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,14 @@ DROP TABLE sequence_test_table;
3131
---
3232
--- test creation of SERIAL column
3333
---
34-
CREATE TABLEserialTest (f1 text, f2 serial);
35-
INSERT INTOserialTest VALUES ('foo');
36-
INSERT INTOserialTest VALUES ('bar');
37-
INSERT INTOserialTest VALUES ('force', 100);
38-
INSERT INTOserialTest VALUES ('wrong', NULL);
34+
CREATE TABLEserialTest1 (f1 text, f2 serial);
35+
INSERT INTOserialTest1 VALUES ('foo');
36+
INSERT INTOserialTest1 VALUES ('bar');
37+
INSERT INTOserialTest1 VALUES ('force', 100);
38+
INSERT INTOserialTest1 VALUES ('wrong', NULL);
3939
ERROR: null value in column "f2" violates not-null constraint
4040
DETAIL: Failing row contains (wrong, null).
41-
SELECT * FROMserialTest;
41+
SELECT * FROMserialTest1;
4242
f1 | f2
4343
-------+-----
4444
foo | 1
@@ -230,9 +230,9 @@ SELECT last_value, log_cnt IN (31, 32) AS log_cnt_ok, is_called FROM foo_seq_new
230230

231231
DROP SEQUENCE foo_seq_new;
232232
-- renaming serial sequences
233-
ALTER TABLEserialtest_f2_seq RENAME TOserialtest_f2_foo;
234-
INSERT INTOserialTest VALUES ('more');
235-
SELECT * FROMserialTest;
233+
ALTER TABLEserialtest1_f2_seq RENAME TOserialtest1_f2_foo;
234+
INSERT INTOserialTest1 VALUES ('more');
235+
SELECT * FROMserialTest1;
236236
f1 | f2
237237
-------+-----
238238
foo | 1
@@ -445,12 +445,12 @@ SELECT * FROM information_schema.sequences
445445
regression | public | sequence_test2 | bigint | 64 | 2 | 0 | 32 | 5 | 36 | 4 | YES
446446
regression | public | sequence_test3 | bigint | 64 | 2 | 0 | 1 | 1 | 9223372036854775807 | 1 | NO
447447
regression | public | sequence_test4 | bigint | 64 | 2 | 0 | -1 | -9223372036854775808 | -1 | -1 | NO
448+
regression | public | serialtest1_f2_foo | bigint | 64 | 2 | 0 | 1 | 1 | 9223372036854775807 | 1 | NO
448449
regression | public | serialtest2_f2_seq | bigint | 64 | 2 | 0 | 1 | 1 | 9223372036854775807 | 1 | NO
449450
regression | public | serialtest2_f3_seq | bigint | 64 | 2 | 0 | 1 | 1 | 9223372036854775807 | 1 | NO
450451
regression | public | serialtest2_f4_seq | bigint | 64 | 2 | 0 | 1 | 1 | 9223372036854775807 | 1 | NO
451452
regression | public | serialtest2_f5_seq | bigint | 64 | 2 | 0 | 1 | 1 | 9223372036854775807 | 1 | NO
452453
regression | public | serialtest2_f6_seq | bigint | 64 | 2 | 0 | 1 | 1 | 9223372036854775807 | 1 | NO
453-
regression | public | serialtest_f2_foo | bigint | 64 | 2 | 0 | 1 | 1 | 9223372036854775807 | 1 | NO
454454
(9 rows)
455455

456456
SELECT schemaname, sequencename, start_value, min_value, max_value, increment_by, cycle, cache_size, last_value
@@ -462,12 +462,12 @@ WHERE sequencename ~ ANY(ARRAY['sequence_test', 'serialtest'])
462462
public | sequence_test2 | 32 | 5 | 36 | 4 | t | 1 | 5
463463
public | sequence_test3 | 1 | 1 | 9223372036854775807 | 1 | f | 1 |
464464
public | sequence_test4 | -1 | -9223372036854775808 | -1 | -1 | f | 1 | -1
465+
public | serialtest1_f2_foo | 1 | 1 | 9223372036854775807 | 1 | f | 1 | 3
465466
public | serialtest2_f2_seq | 1 | 1 | 9223372036854775807 | 1 | f | 1 | 2
466467
public | serialtest2_f3_seq | 1 | 1 | 9223372036854775807 | 1 | f | 1 | 2
467468
public | serialtest2_f4_seq | 1 | 1 | 9223372036854775807 | 1 | f | 1 | 2
468469
public | serialtest2_f5_seq | 1 | 1 | 9223372036854775807 | 1 | f | 1 | 2
469470
public | serialtest2_f6_seq | 1 | 1 | 9223372036854775807 | 1 | f | 1 | 2
470-
public | serialtest_f2_foo | 1 | 1 | 9223372036854775807 | 1 | f | 1 | 3
471471
(9 rows)
472472

473473
SELECT * FROM pg_sequence_parameters('sequence_test4'::regclass);
@@ -716,7 +716,7 @@ ALTER SEQUENCE sequence_test2 START WITH 1;
716716
ERROR: must be owner of relation sequence_test2
717717
ROLLBACK;
718718
-- Sequences should get wiped out as well:
719-
DROP TABLEserialTest, serialTest2;
719+
DROP TABLEserialTest1, serialTest2;
720720
-- Make sure sequences are gone:
721721
SELECT * FROM information_schema.sequences WHERE sequence_name IN
722722
('sequence_test2', 'serialtest2_f2_seq', 'serialtest2_f3_seq',

‎src/test/regress/sql/sequence.sql

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@ DROP TABLE sequence_test_table;
2323
--- test creation of SERIAL column
2424
---
2525

26-
CREATETABLEserialTest (f1text, f2serial);
26+
CREATETABLEserialTest1 (f1text, f2serial);
2727

28-
INSERT INTOserialTestVALUES ('foo');
29-
INSERT INTOserialTestVALUES ('bar');
30-
INSERT INTOserialTestVALUES ('force',100);
31-
INSERT INTOserialTestVALUES ('wrong',NULL);
28+
INSERT INTOserialTest1VALUES ('foo');
29+
INSERT INTOserialTest1VALUES ('bar');
30+
INSERT INTOserialTest1VALUES ('force',100);
31+
INSERT INTOserialTest1VALUES ('wrong',NULL);
3232

33-
SELECT*FROMserialTest;
33+
SELECT*FROMserialTest1;
3434

3535
-- test smallserial / bigserial
3636
CREATETABLEserialTest2 (f1text, f2serial, f3 smallserial, f4 serial2,
@@ -111,9 +111,9 @@ SELECT last_value, log_cnt IN (31, 32) AS log_cnt_ok, is_called FROM foo_seq_new
111111
DROPSEQUENCE foo_seq_new;
112112

113113
-- renaming serial sequences
114-
ALTERTABLEserialtest_f2_seq RENAME TOserialtest_f2_foo;
115-
INSERT INTOserialTestVALUES ('more');
116-
SELECT*FROMserialTest;
114+
ALTERTABLEserialtest1_f2_seq RENAME TOserialtest1_f2_foo;
115+
INSERT INTOserialTest1VALUES ('more');
116+
SELECT*FROMserialTest1;
117117

118118
--
119119
-- Check dependencies of serial and ordinary sequences
@@ -353,7 +353,7 @@ ALTER SEQUENCE sequence_test2 START WITH 1;
353353
ROLLBACK;
354354

355355
-- Sequences should get wiped out as well:
356-
DROPTABLEserialTest, serialTest2;
356+
DROPTABLEserialTest1, serialTest2;
357357

358358
-- Make sure sequences are gone:
359359
SELECT*FROMinformation_schema.sequencesWHERE sequence_nameIN

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp