File tree 4 files changed +16
-6
lines changed
4 files changed +16
-6
lines changed Original file line number Diff line number Diff line change @@ -3353,7 +3353,8 @@ from pg_attribute
3353
3353
where attname = 'a'
3354
3354
and (attrelid = 'p'::regclass
3355
3355
or attrelid = 'p1'::regclass
3356
- or attrelid = 'p11'::regclass);
3356
+ or attrelid = 'p11'::regclass)
3357
+ order by attrelid::regclass::text;
3357
3358
attrelid | attname | attnum
3358
3359
----------+---------+--------
3359
3360
p | a | 1
Original file line number Diff line number Diff line change @@ -400,7 +400,9 @@ SELECT relkind FROM pg_class WHERE relname = 'partitioned';
400
400
(1 row)
401
401
402
402
-- check that range partition key columns are marked NOT NULL
403
- SELECT attname, attnotnull FROM pg_attribute WHERE attrelid = 'partitioned'::regclass AND attnum > 0;
403
+ SELECT attname, attnotnull FROM pg_attribute
404
+ WHERE attrelid = 'partitioned'::regclass AND attnum > 0
405
+ ORDER BY attnum;
404
406
attname | attnotnull
405
407
---------+------------
406
408
a | t
@@ -575,7 +577,9 @@ CREATE TABLE parted (
575
577
) PARTITION BY LIST (a);
576
578
CREATE TABLE part_a PARTITION OF parted FOR VALUES IN ('a');
577
579
-- only inherited attributes (never local ones)
578
- SELECT attname, attislocal, attinhcount FROM pg_attribute WHERE attrelid = 'part_a'::regclass and attnum > 0;
580
+ SELECT attname, attislocal, attinhcount FROM pg_attribute
581
+ WHERE attrelid = 'part_a'::regclass and attnum > 0
582
+ ORDER BY attnum;
579
583
attname | attislocal | attinhcount
580
584
---------+------------+-------------
581
585
a | f | 1
Original file line number Diff line number Diff line change @@ -2206,7 +2206,8 @@ from pg_attribute
2206
2206
where attname = ' a'
2207
2207
and (attrelid = ' p' ::regclass
2208
2208
or attrelid = ' p1' ::regclass
2209
- or attrelid = ' p11' ::regclass);
2209
+ or attrelid = ' p11' ::regclass)
2210
+ order by attrelid::regclass::text ;
2210
2211
2211
2212
alter table p1 attach partition p11 for values from (2 ) to (5 );
2212
2213
Original file line number Diff line number Diff line change @@ -403,7 +403,9 @@ CREATE TABLE partitioned (
403
403
SELECT relkind FROM pg_class WHERE relname = ' partitioned' ;
404
404
405
405
-- check that range partition key columns are marked NOT NULL
406
- SELECT attname, attnotnull FROM pg_attribute WHERE attrelid = ' partitioned' ::regclass AND attnum > 0 ;
406
+ SELECT attname, attnotnull FROM pg_attribute
407
+ WHERE attrelid = ' partitioned' ::regclass AND attnum > 0
408
+ ORDER BY attnum;
407
409
408
410
-- prevent a function referenced in partition key from being dropped
409
411
DROP FUNCTION plusone(int );
@@ -548,7 +550,9 @@ CREATE TABLE parted (
548
550
CREATE TABLE part_a PARTITION OF parted FOR VALUES IN (' a' );
549
551
550
552
-- only inherited attributes (never local ones)
551
- SELECT attname, attislocal, attinhcount FROM pg_attribute WHERE attrelid = ' part_a' ::regclass and attnum > 0 ;
553
+ SELECT attname, attislocal, attinhcount FROM pg_attribute
554
+ WHERE attrelid = ' part_a' ::regclass and attnum > 0
555
+ ORDER BY attnum;
552
556
553
557
-- able to specify column default, column constraint, and table constraint
554
558
CREATE TABLE part_b PARTITION OF parted (
You can’t perform that action at this time.
0 commit comments