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

Commit984f2f4

Browse files
committed
slightly improved error messages
1 parent33d2cf7 commit984f2f4

File tree

3 files changed

+9
-11
lines changed

3 files changed

+9
-11
lines changed

‎expected/pathman_basic.out

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ INSERT INTO test.hash_rel VALUES (1, 1);
1010
INSERT INTO test.hash_rel VALUES (2, 2);
1111
INSERT INTO test.hash_rel VALUES (3, 3);
1212
SELECT pathman.create_hash_partitions('test.hash_rel', 'value', 3);
13-
ERROR: partitioning key'value' must be NOT NULL
13+
ERROR: partitioning key"value" must be NOT NULL
1414
ALTER TABLE test.hash_rel ALTER COLUMN value SET NOT NULL;
1515
SELECT pathman.create_hash_partitions('test.hash_rel', 'value', 3, partition_data:=false);
1616
create_hash_partitions
@@ -131,10 +131,10 @@ CREATE INDEX ON test.range_rel (dt);
131131
INSERT INTO test.range_rel (dt, txt)
132132
SELECT g, md5(g::TEXT) FROM generate_series('2015-01-01', '2015-04-30', '1 day'::interval) as g;
133133
SELECT pathman.create_range_partitions('test.range_rel', 'dt', '2015-01-01'::DATE, '1 month'::INTERVAL, 2);
134-
ERROR: partitioning key'dt' must be NOT NULL
134+
ERROR: partitioning key"dt" must be NOT NULL
135135
ALTER TABLE test.range_rel ALTER COLUMN dt SET NOT NULL;
136136
SELECT pathman.create_range_partitions('test.range_rel', 'dt', '2015-01-01'::DATE, '1 month'::INTERVAL, 2);
137-
ERROR: not enough partitions to fit all values of'dt'
137+
ERROR: not enough partitions to fit all values of"dt"
138138
SELECT pathman.create_range_partitions('test.range_rel', 'DT', '2015-01-01'::DATE, '1 month'::INTERVAL);
139139
NOTICE: sequence "range_rel_seq" does not exist, skipping
140140
create_range_partitions

‎init.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ BEGIN
376376
END IF;
377377

378378
IF @extschema@.is_attribute_nullable(relation, p_attribute) THEN
379-
RAISE EXCEPTION'partitioning key''%'' must be NOT NULL', p_attribute;
379+
RAISE EXCEPTION'partitioning key"%" must be NOT NULL', p_attribute;
380380
END IF;
381381

382382
/* Check if there are foreign keys that reference the relation*/

‎range.sql

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,19 +45,17 @@ BEGIN
4545

4646
/* Check if column has NULL values*/
4747
IF v_count>0AND (v_min ISNULLOR v_max ISNULL) THEN
48-
RAISE EXCEPTION'''%''column contains NULL values', attribute;
48+
RAISE EXCEPTION'column "%" contains NULL values', attribute;
4949
END IF;
5050

5151
/* Check lower boundary*/
5252
IF start_value> v_min THEN
53-
RAISE EXCEPTION'start value is less than minimum value of''%''',
54-
attribute;
53+
RAISE EXCEPTION'start value is less than min value of "%"', attribute;
5554
END IF;
5655

5756
/* Check upper boundary*/
5857
IF end_value<= v_max THEN
59-
RAISE EXCEPTION'not enough partitions to fit all values of''%''',
60-
attribute;
58+
RAISE EXCEPTION'not enough partitions to fit all values of "%"', attribute;
6159
END IF;
6260
END
6361
$$ LANGUAGE plpgsql;
@@ -225,7 +223,7 @@ BEGIN
225223
END IF;
226224

227225
IF v_max ISNULL THEN
228-
RAISE EXCEPTION'''%''column has NULL values', attribute;
226+
RAISE EXCEPTION'column "%" has NULL values', attribute;
229227
END IF;
230228

231229
p_count :=0;
@@ -577,7 +575,7 @@ BEGIN
577575

578576
/* Check if this is a RANGE partition*/
579577
IF v_part_type!=2 THEN
580-
RAISE EXCEPTION'specified partitionsaren''t RANGE partitions';
578+
RAISE EXCEPTION'specified partitionsare not RANGE partitions';
581579
END IF;
582580

583581
v_atttype := @extschema@.get_attribute_type(partition1, v_attname);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp