Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
189d0ff5
Commit
189d0ff5
authored
Jan 19, 2018
by
Alvaro Herrera
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix regression tests for better stability
Per buildfarm
parent
8b08f7d4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
18 deletions
+18
-18
src/test/regress/expected/indexing.out
src/test/regress/expected/indexing.out
+13
-13
src/test/regress/sql/indexing.sql
src/test/regress/sql/indexing.sql
+5
-5
No files found.
src/test/regress/expected/indexing.out
View file @
189d0ff5
...
...
@@ -224,26 +224,26 @@ Partition of: idxpart2 FOR VALUES FROM (100) TO (200)
select indexrelid::regclass, indrelid::regclass, inhparent::regclass
from pg_index idx left join pg_inherits inh on (idx.indexrelid = inh.inhrelid)
where indexrelid::regclass::text like 'idxpart%'
order by indrelid::regclass::text collate "C";
order by ind
ex
relid::regclass::text collate "C";
indexrelid | indrelid | inhparent
-----------------+-----------+---------------
idxpart_a_idx | idxpart |
idxpart1_a_idx | idxpart1 | idxpart_a_idx
idxpart2_a_idx | idxpart2 | idxpart_a_idx
idxpart22_a_idx | idxpart22 |
idxpart2_a_idx | idxpart2 | idxpart_a_idx
idxpart_a_idx | idxpart |
(4 rows)
alter index idxpart2_a_idx attach partition idxpart22_a_idx;
select indexrelid::regclass, indrelid::regclass, inhparent::regclass
from pg_index idx left join pg_inherits inh on (idx.indexrelid = inh.inhrelid)
where indexrelid::regclass::text like 'idxpart%'
order by indrelid::regclass::text collate "C";
order by ind
ex
relid::regclass::text collate "C";
indexrelid | indrelid | inhparent
-----------------+-----------+----------------
idxpart_a_idx | idxpart |
idxpart1_a_idx | idxpart1 | idxpart_a_idx
idxpart2_a_idx | idxpart2 | idxpart_a_idx
idxpart22_a_idx | idxpart22 | idxpart2_a_idx
idxpart2_a_idx | idxpart2 | idxpart_a_idx
idxpart_a_idx | idxpart |
(4 rows)
-- attaching idxpart22 is not enough to set idxpart22_a_idx valid ...
...
...
@@ -600,15 +600,15 @@ alter table idxpart attach partition idxpart2 for values from (10) to (20);
select c.relname, pg_get_indexdef(indexrelid)
from pg_class c join pg_index i on c.oid = i.indexrelid
where indrelid::regclass::text like 'idxpart%'
order by indrelid::regclass::text collate "C";
order by ind
ex
relid::regclass::text collate "C";
relname | pg_get_indexdef
------------------+--------------------------------------------------------------
idxparti | CREATE INDEX idxparti ON ONLY idxpart USING btree (a)
idxparti2 | CREATE INDEX idxparti2 ON ONLY idxpart USING btree (c, b)
idxpart1_a_idx | CREATE INDEX idxpart1_a_idx ON idxpart1 USING btree (a)
idxpart1_c_b_idx | CREATE INDEX idxpart1_c_b_idx ON idxpart1 USING btree (c, b)
idxpart2_a_idx | CREATE INDEX idxpart2_a_idx ON idxpart2 USING btree (a)
idxpart2_c_b_idx | CREATE INDEX idxpart2_c_b_idx ON idxpart2 USING btree (c, b)
idxparti | CREATE INDEX idxparti ON ONLY idxpart USING btree (a)
idxparti2 | CREATE INDEX idxparti2 ON ONLY idxpart USING btree (c, b)
(6 rows)
drop table idxpart;
...
...
@@ -626,12 +626,12 @@ alter table idxpart attach partition idxpart1 for values from (1) to (2);
select c.relname, pg_get_indexdef(indexrelid)
from pg_class c join pg_index i on c.oid = i.indexrelid
where indrelid::regclass::text like 'idxpart%'
order by indrelid::regclass::text collate "C";
order by ind
ex
relid::regclass::text collate "C";
relname | pg_get_indexdef
------------------+-------------------------------------------------------------------
idxpart_abs_idx | CREATE INDEX idxpart_abs_idx ON ONLY idxpart USING btree (abs(b))
idxpart1_abs_idx | CREATE INDEX idxpart1_abs_idx ON idxpart1 USING btree (abs(b))
idxpart2_abs_idx | CREATE INDEX idxpart2_abs_idx ON idxpart2 USING btree (abs(b))
idxpart_abs_idx | CREATE INDEX idxpart_abs_idx ON ONLY idxpart USING btree (abs(b))
(3 rows)
drop table idxpart;
...
...
@@ -649,12 +649,12 @@ create index on idxpart (a) where b > 1000;
select c.relname, pg_get_indexdef(indexrelid)
from pg_class c join pg_index i on c.oid = i.indexrelid
where indrelid::regclass::text like 'idxpart%'
order by indrelid::regclass::text collate "C";
order by ind
ex
relid::regclass::text collate "C";
relname | pg_get_indexdef
----------------+-----------------------------------------------------------------------------
idxpart_a_idx | CREATE INDEX idxpart_a_idx ON ONLY idxpart USING btree (a) WHERE (b > 1000)
idxpart1_a_idx | CREATE INDEX idxpart1_a_idx ON idxpart1 USING btree (a) WHERE (b > 1000)
idxpart2_a_idx | CREATE INDEX idxpart2_a_idx ON idxpart2 USING btree (a) WHERE (b > 1000)
idxpart_a_idx | CREATE INDEX idxpart_a_idx ON ONLY idxpart USING btree (a) WHERE (b > 1000)
(3 rows)
drop table idxpart;
...
...
src/test/regress/sql/indexing.sql
View file @
189d0ff5
...
...
@@ -116,12 +116,12 @@ create index on idxpart (a);
select
indexrelid
::
regclass
,
indrelid
::
regclass
,
inhparent
::
regclass
from
pg_index
idx
left
join
pg_inherits
inh
on
(
idx
.
indexrelid
=
inh
.
inhrelid
)
where
indexrelid
::
regclass
::
text
like
'idxpart%'
order
by
indrelid
::
regclass
::
text
collate
"C"
;
order
by
ind
ex
relid
::
regclass
::
text
collate
"C"
;
alter
index
idxpart2_a_idx
attach
partition
idxpart22_a_idx
;
select
indexrelid
::
regclass
,
indrelid
::
regclass
,
inhparent
::
regclass
from
pg_index
idx
left
join
pg_inherits
inh
on
(
idx
.
indexrelid
=
inh
.
inhrelid
)
where
indexrelid
::
regclass
::
text
like
'idxpart%'
order
by
indrelid
::
regclass
::
text
collate
"C"
;
order
by
ind
ex
relid
::
regclass
::
text
collate
"C"
;
-- attaching idxpart22 is not enough to set idxpart22_a_idx valid ...
alter
index
idxpart2_a_idx
attach
partition
idxpart22_a_idx
;
\
d
idxpart2
...
...
@@ -306,7 +306,7 @@ alter table idxpart attach partition idxpart2 for values from (10) to (20);
select
c
.
relname
,
pg_get_indexdef
(
indexrelid
)
from
pg_class
c
join
pg_index
i
on
c
.
oid
=
i
.
indexrelid
where
indrelid
::
regclass
::
text
like
'idxpart%'
order
by
indrelid
::
regclass
::
text
collate
"C"
;
order
by
ind
ex
relid
::
regclass
::
text
collate
"C"
;
drop
table
idxpart
;
-- Verify that columns are mapped correctly in expression indexes
...
...
@@ -323,7 +323,7 @@ alter table idxpart attach partition idxpart1 for values from (1) to (2);
select
c
.
relname
,
pg_get_indexdef
(
indexrelid
)
from
pg_class
c
join
pg_index
i
on
c
.
oid
=
i
.
indexrelid
where
indrelid
::
regclass
::
text
like
'idxpart%'
order
by
indrelid
::
regclass
::
text
collate
"C"
;
order
by
ind
ex
relid
::
regclass
::
text
collate
"C"
;
drop
table
idxpart
;
-- Verify that columns are mapped correctly for WHERE in a partial index
...
...
@@ -340,7 +340,7 @@ create index on idxpart (a) where b > 1000;
select
c
.
relname
,
pg_get_indexdef
(
indexrelid
)
from
pg_class
c
join
pg_index
i
on
c
.
oid
=
i
.
indexrelid
where
indrelid
::
regclass
::
text
like
'idxpart%'
order
by
indrelid
::
regclass
::
text
collate
"C"
;
order
by
ind
ex
relid
::
regclass
::
text
collate
"C"
;
drop
table
idxpart
;
-- Column number mapping: dropped columns in the partition
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment