Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
postgres-lambda-diff
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jakob Huber
postgres-lambda-diff
Commits
b921a26f
You need to sign in or sign up before continuing.
Commit
b921a26f
authored
11 years ago
by
Simon Riggs
Browse files
Options
Downloads
Patches
Plain Diff
Regression tests for ALTER TABLESPACE RENAME,OWNER
Hari Babu Kommi reviewed by David Rowley
parent
b5e0a2a3
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/test/regress/input/tablespace.source
+16
-1
16 additions, 1 deletion
src/test/regress/input/tablespace.source
src/test/regress/output/tablespace.source
+11
-1
11 additions, 1 deletion
src/test/regress/output/tablespace.source
with
27 additions
and
2 deletions
src/test/regress/input/tablespace.source
+
16
−
1
View file @
b921a26f
...
...
@@ -54,7 +54,22 @@ CREATE TABLE bar (i int) TABLESPACE nosuchspace;
-- Fail, not empty
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;
-- Should succeed
DROP TABLESPACE testspace;
DROP TABLESPACE testspace_renamed;
DROP ROLE tablespace_testuser1;
DROP ROLE tablespace_testuser2;
This diff is collapsed.
Click to expand it.
src/test/regress/output/tablespace.source
+
11
−
1
View file @
b921a26f
...
...
@@ -72,6 +72,14 @@ ERROR: tablespace "nosuchspace" does not exist
-- Fail, not empty
DROP TABLESPACE testspace;
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;
NOTICE: drop cascades to 4 other objects
DETAIL: drop cascades to table testschema.foo
...
...
@@ -79,4 +87,6 @@ drop cascades to table testschema.asselect
drop cascades to table testschema.asexecute
drop cascades to table testschema.atable
-- Should succeed
DROP TABLESPACE testspace;
DROP TABLESPACE testspace_renamed;
DROP ROLE tablespace_testuser1;
DROP ROLE tablespace_testuser2;
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment