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
b921a26f
Commit
b921a26f
authored
Dec 11, 2013
by
Simon Riggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Regression tests for ALTER TABLESPACE RENAME,OWNER
Hari Babu Kommi reviewed by David Rowley
parent
b5e0a2a3
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
2 deletions
+27
-2
src/test/regress/input/tablespace.source
src/test/regress/input/tablespace.source
+16
-1
src/test/regress/output/tablespace.source
src/test/regress/output/tablespace.source
+11
-1
No files found.
src/test/regress/input/tablespace.source
View file @
b921a26f
...
@@ -54,7 +54,22 @@ CREATE TABLE bar (i int) TABLESPACE nosuchspace;
...
@@ -54,7 +54,22 @@ CREATE TABLE bar (i int) TABLESPACE nosuchspace;
-- Fail, not empty
-- Fail, not empty
DROP TABLESPACE testspace;
DROP TABLESPACE testspace;
CREATE ROLE tablespace_testuser1 login;
CREATE ROLE tablespace_testuser2 login;
ALTER TABLESPACE testspace OWNER TO tablespace_testuser1;
SET SESSION ROLE tablespace_testuser2;
CREATE TABLE tablespace_table (i int) TABLESPACE testspace; -- fail
\c -
ALTER TABLESPACE testspace RENAME TO testspace_renamed;
DROP SCHEMA testschema CASCADE;
DROP SCHEMA testschema CASCADE;
-- Should succeed
-- Should succeed
DROP TABLESPACE testspace;
DROP TABLESPACE testspace_renamed;
DROP ROLE tablespace_testuser1;
DROP ROLE tablespace_testuser2;
src/test/regress/output/tablespace.source
View file @
b921a26f
...
@@ -72,6 +72,14 @@ ERROR: tablespace "nosuchspace" does not exist
...
@@ -72,6 +72,14 @@ ERROR: tablespace "nosuchspace" does not exist
-- Fail, not empty
-- Fail, not empty
DROP TABLESPACE testspace;
DROP TABLESPACE testspace;
ERROR: tablespace "testspace" is not empty
ERROR: tablespace "testspace" is not empty
CREATE ROLE tablespace_testuser1 login;
CREATE ROLE tablespace_testuser2 login;
ALTER TABLESPACE testspace OWNER TO tablespace_testuser1;
SET SESSION ROLE tablespace_testuser2;
CREATE TABLE tablespace_table (i int) TABLESPACE testspace; -- fail
ERROR: permission denied for tablespace testspace
\c -
ALTER TABLESPACE testspace RENAME TO testspace_renamed;
DROP SCHEMA testschema CASCADE;
DROP SCHEMA testschema CASCADE;
NOTICE: drop cascades to 4 other objects
NOTICE: drop cascades to 4 other objects
DETAIL: drop cascades to table testschema.foo
DETAIL: drop cascades to table testschema.foo
...
@@ -79,4 +87,6 @@ drop cascades to table testschema.asselect
...
@@ -79,4 +87,6 @@ drop cascades to table testschema.asselect
drop cascades to table testschema.asexecute
drop cascades to table testschema.asexecute
drop cascades to table testschema.atable
drop cascades to table testschema.atable
-- Should succeed
-- Should succeed
DROP TABLESPACE testspace;
DROP TABLESPACE testspace_renamed;
DROP ROLE tablespace_testuser1;
DROP ROLE tablespace_testuser2;
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