File tree Expand file tree Collapse file tree 4 files changed +16
-6
lines changed Expand file tree Collapse file tree 4 files changed +16
-6
lines changed Original file line number Diff line number Diff line change @@ -3353,7 +3353,8 @@ from pg_attribute
33533353where attname = 'a'
33543354 and (attrelid = 'p'::regclass
33553355 or attrelid = 'p1'::regclass
3356- or attrelid = 'p11'::regclass);
3356+ or attrelid = 'p11'::regclass)
3357+ order by attrelid::regclass::text;
33573358 attrelid | attname | attnum
33583359----------+---------+--------
33593360 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';
400400(1 row)
401401
402402-- 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;
404406 attname | attnotnull
405407---------+------------
406408 a | t
@@ -575,7 +577,9 @@ CREATE TABLE parted (
575577) PARTITION BY LIST (a);
576578CREATE TABLE part_a PARTITION OF parted FOR VALUES IN ('a');
577579-- 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;
579583 attname | attislocal | attinhcount
580584---------+------------+-------------
581585 a | f | 1
Original file line number Diff line number Diff line change @@ -2206,7 +2206,8 @@ from pg_attribute
22062206where attname = ' a'
22072207 and (attrelid = ' p' ::regclass
22082208 or attrelid = ' p1' ::regclass
2209- or attrelid = ' p11' ::regclass);
2209+ or attrelid = ' p11' ::regclass)
2210+ order by attrelid::regclass::text ;
22102211
22112212alter table p1 attach partition p11 for values from (2 ) to (5 );
22122213
Original file line number Diff line number Diff line change @@ -403,7 +403,9 @@ CREATE TABLE partitioned (
403403SELECT relkind FROM pg_class WHERE relname = ' partitioned' ;
404404
405405-- 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;
407409
408410-- prevent a function referenced in partition key from being dropped
409411DROP FUNCTION plusone(int );
@@ -548,7 +550,9 @@ CREATE TABLE parted (
548550CREATE TABLE part_a PARTITION OF parted FOR VALUES IN (' a' );
549551
550552-- 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;
552556
553557-- able to specify column default, column constraint, and table constraint
554558CREATE TABLE part_b PARTITION OF parted (
You can’t perform that action at this time.
0 commit comments