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
f563afd4
Commit
f563afd4
authored
Jul 04, 2011
by
Simon Riggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Alter test results to comply with new ALTER TABLE behaviour.
parent
2c3d9db5
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
39 deletions
+35
-39
src/test/regress/expected/alter_table.out
src/test/regress/expected/alter_table.out
+35
-37
src/test/regress/sql/alter_table.sql
src/test/regress/sql/alter_table.sql
+0
-2
No files found.
src/test/regress/expected/alter_table.out
View file @
f563afd4
...
...
@@ -1669,90 +1669,88 @@ and c.relname != 'my_locks'
group by c.relname;
create table alterlock (f1 int primary key, f2 text);
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "alterlock_pkey" for table "alterlock"
-- share update exclusive
begin; alter table alterlock alter column f2 set statistics 150;
select * from my_locks order by 1;
relname | max_lockmode
-----------+---------------------
-----
alterlock |
ShareUpdate
ExclusiveLock
-----------+---------------------
alterlock |
Access
ExclusiveLock
(1 row)
rollback;
begin; alter table alterlock cluster on alterlock_pkey;
select * from my_locks order by 1;
relname | max_lockmode
----------------+---------------------
-----
alterlock |
ShareUpdate
ExclusiveLock
alterlock_pkey |
ShareUpdate
ExclusiveLock
----------------+---------------------
alterlock |
Access
ExclusiveLock
alterlock_pkey |
Access
ExclusiveLock
(2 rows)
commit;
begin; alter table alterlock set without cluster;
select * from my_locks order by 1;
relname | max_lockmode
-----------+---------------------
-----
alterlock |
ShareUpdate
ExclusiveLock
-----------+---------------------
alterlock |
Access
ExclusiveLock
(1 row)
commit;
begin; alter table alterlock set (fillfactor = 100);
select * from my_locks order by 1;
relname | max_lockmode
-----------+---------------------
-----
alterlock |
ShareUpdate
ExclusiveLock
pg_toast |
ShareUpdate
ExclusiveLock
-----------+---------------------
alterlock |
Access
ExclusiveLock
pg_toast |
Access
ExclusiveLock
(2 rows)
commit;
begin; alter table alterlock reset (fillfactor);
select * from my_locks order by 1;
relname | max_lockmode
-----------+---------------------
-----
alterlock |
ShareUpdate
ExclusiveLock
pg_toast |
ShareUpdate
ExclusiveLock
-----------+---------------------
alterlock |
Access
ExclusiveLock
pg_toast |
Access
ExclusiveLock
(2 rows)
commit;
begin; alter table alterlock set (toast.autovacuum_enabled = off);
select * from my_locks order by 1;
relname | max_lockmode
-----------+---------------------
-----
alterlock |
ShareUpdate
ExclusiveLock
pg_toast |
ShareUpdate
ExclusiveLock
-----------+---------------------
alterlock |
Access
ExclusiveLock
pg_toast |
Access
ExclusiveLock
(2 rows)
commit;
begin; alter table alterlock set (autovacuum_enabled = off);
select * from my_locks order by 1;
relname | max_lockmode
-----------+---------------------
-----
alterlock |
ShareUpdate
ExclusiveLock
pg_toast |
ShareUpdate
ExclusiveLock
-----------+---------------------
alterlock |
Access
ExclusiveLock
pg_toast |
Access
ExclusiveLock
(2 rows)
commit;
begin; alter table alterlock alter column f2 set (n_distinct = 1);
select * from my_locks order by 1;
relname | max_lockmode
-----------+---------------------
-----
alterlock |
ShareUpdate
ExclusiveLock
-----------+---------------------
alterlock |
Access
ExclusiveLock
(1 row)
rollback;
begin; alter table alterlock alter column f2 set storage extended;
select * from my_locks order by 1;
relname | max_lockmode
-----------+---------------------
-----
alterlock |
ShareUpdate
ExclusiveLock
-----------+---------------------
alterlock |
Access
ExclusiveLock
(1 row)
rollback;
-- share row exclusive
begin; alter table alterlock alter column f2 set default 'x';
select * from my_locks order by 1;
relname | max_lockmode
-----------+---------------------
--
alterlock |
ShareRow
ExclusiveLock
-----------+---------------------
alterlock |
Access
ExclusiveLock
(1 row)
rollback;
...
...
src/test/regress/sql/alter_table.sql
View file @
f563afd4
...
...
@@ -1221,7 +1221,6 @@ group by c.relname;
create
table
alterlock
(
f1
int
primary
key
,
f2
text
);
-- share update exclusive
begin
;
alter
table
alterlock
alter
column
f2
set
statistics
150
;
select
*
from
my_locks
order
by
1
;
rollback
;
...
...
@@ -1258,7 +1257,6 @@ begin; alter table alterlock alter column f2 set storage extended;
select
*
from
my_locks
order
by
1
;
rollback
;
-- share row exclusive
begin
;
alter
table
alterlock
alter
column
f2
set
default
'x'
;
select
*
from
my_locks
order
by
1
;
rollback
;
...
...
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