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
f33c53ec
Commit
f33c53ec
authored
Jul 03, 2013
by
Robert Haas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Hopefully-portable regression tests for CREATE/ALTER/DROP COLLATION."
This reverts commit
26364530
. The buildfarm is sad.
parent
26364530
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
91 deletions
+0
-91
src/test/regress/expected/collate.out
src/test/regress/expected/collate.out
+0
-46
src/test/regress/sql/collate.sql
src/test/regress/sql/collate.sql
+0
-45
No files found.
src/test/regress/expected/collate.out
View file @
f33c53ec
...
@@ -626,51 +626,6 @@ SELECT collation for ((SELECT b FROM collate_test1 LIMIT 1));
...
@@ -626,51 +626,6 @@ SELECT collation for ((SELECT b FROM collate_test1 LIMIT 1));
"C"
"C"
(1 row)
(1 row)
-- CREATE COLLATE tests
CREATE COLLATION collate_coll2 FROM "C";
-- Ensure non-OWNER ROLEs are not able to ALTER/DROP COLLATION
CREATE ROLE regress_rol_col1;
GRANT USAGE ON SCHEMA collate_tests TO regress_rol_col1;
SET ROLE regress_rol_col1;
DROP COLLATION IF EXISTS collate_tests.collate_coll2;
ERROR: must be owner of collation collate_tests.collate_coll2
RESET ROLE;
-- Ensure ALTER COLLATION SET SCHEMA works as expected
CREATE SCHEMA collate_tests2;
ALTER COLLATION collate_coll2 SET SCHEMA collate_tests2;
DROP COLLATION collate_tests2.collate_coll2;
DROP SCHEMA collate_tests2;
-- Should work. Classic cases of CREATE/ALTER COLLATION
CREATE COLLATION collate_coll3 (LOCALE = 'C');
ALTER COLLATION collate_coll3 OWNER TO regress_rol_col1;
ALTER COLLATION collate_coll3 RENAME TO collate_coll33;
DROP COLLATION collate_coll33;
-- Should fail. Give redundant options
CREATE COLLATION collate_coll3a (LOCALE = 'C', LC_COLLATE = 'C', LC_CTYPE= 'C');
ERROR: conflicting or redundant options
-- Should fail. LC_COLLATE must be specified
CREATE COLLATION collate_coll5 (LC_CTYPE= 'C');
ERROR: parameter "lc_collate" must be specified
-- Should fail. Give value options without value
CREATE COLLATION collate_coll4a (LC_COLLATE = '');
ERROR: parameter "lc_ctype" must be specified
CREATE COLLATION collate_coll5a (LC_CTYPE= '');
ERROR: parameter "lc_collate" must be specified
-- Should fail. Give invalid option name
CREATE COLLATION collate_coll6 (ASDF = 'C');
ERROR: collation attribute "asdf" not recognized
-- Ensure ROLEs without USAGE access can't CREATE/ALTER COLLATION
CREATE SCHEMA collate_tests4;
CREATE COLLATION collate_tests4.collate_coll9 (LOCALE = 'C');
REVOKE USAGE ON SCHEMA collate_tests4 FROM regress_rol_col1;
SET ROLE regress_rol_col1;
ALTER COLLATION collate_tests4.collate_coll9 RENAME TO collate_coll9b;
ERROR: permission denied for schema collate_tests4
CREATE COLLATION collate_tests4.collate_coll10 (LOCALE = 'C');
ERROR: permission denied for schema collate_tests4
RESET ROLE;
DROP SCHEMA collate_tests4 CASCADE;
NOTICE: drop cascades to collation collate_coll9
--
--
-- Clean up. Many of these table names will be re-used if the user is
-- Clean up. Many of these table names will be re-used if the user is
-- trying to run any platform-specific collation tests later, so we
-- trying to run any platform-specific collation tests later, so we
...
@@ -693,4 +648,3 @@ drop cascades to function dup(anyelement)
...
@@ -693,4 +648,3 @@ drop cascades to function dup(anyelement)
drop cascades to table collate_test20
drop cascades to table collate_test20
drop cascades to table collate_test21
drop cascades to table collate_test21
drop cascades to table collate_test22
drop cascades to table collate_test22
DROP ROLE regress_rol_col1;
src/test/regress/sql/collate.sql
View file @
f33c53ec
...
@@ -231,50 +231,6 @@ SELECT collation for ('foo'::text);
...
@@ -231,50 +231,6 @@ SELECT collation for ('foo'::text);
SELECT
collation
for
((
SELECT
a
FROM
collate_test1
LIMIT
1
));
-- non-collatable type - error
SELECT
collation
for
((
SELECT
a
FROM
collate_test1
LIMIT
1
));
-- non-collatable type - error
SELECT
collation
for
((
SELECT
b
FROM
collate_test1
LIMIT
1
));
SELECT
collation
for
((
SELECT
b
FROM
collate_test1
LIMIT
1
));
-- CREATE COLLATE tests
CREATE
COLLATION
collate_coll2
FROM
"C"
;
-- Ensure non-OWNER ROLEs are not able to ALTER/DROP COLLATION
CREATE
ROLE
regress_rol_col1
;
GRANT
USAGE
ON
SCHEMA
collate_tests
TO
regress_rol_col1
;
SET
ROLE
regress_rol_col1
;
DROP
COLLATION
IF
EXISTS
collate_tests
.
collate_coll2
;
RESET
ROLE
;
-- Ensure ALTER COLLATION SET SCHEMA works as expected
CREATE
SCHEMA
collate_tests2
;
ALTER
COLLATION
collate_coll2
SET
SCHEMA
collate_tests2
;
DROP
COLLATION
collate_tests2
.
collate_coll2
;
DROP
SCHEMA
collate_tests2
;
-- Should work. Classic cases of CREATE/ALTER COLLATION
CREATE
COLLATION
collate_coll3
(
LOCALE
=
'C'
);
ALTER
COLLATION
collate_coll3
OWNER
TO
regress_rol_col1
;
ALTER
COLLATION
collate_coll3
RENAME
TO
collate_coll33
;
DROP
COLLATION
collate_coll33
;
-- Should fail. Give redundant options
CREATE
COLLATION
collate_coll3a
(
LOCALE
=
'C'
,
LC_COLLATE
=
'C'
,
LC_CTYPE
=
'C'
);
-- Should fail. LC_COLLATE must be specified
CREATE
COLLATION
collate_coll5
(
LC_CTYPE
=
'C'
);
-- Should fail. Give value options without value
CREATE
COLLATION
collate_coll4a
(
LC_COLLATE
=
''
);
CREATE
COLLATION
collate_coll5a
(
LC_CTYPE
=
''
);
-- Should fail. Give invalid option name
CREATE
COLLATION
collate_coll6
(
ASDF
=
'C'
);
-- Ensure ROLEs without USAGE access can't CREATE/ALTER COLLATION
CREATE
SCHEMA
collate_tests4
;
CREATE
COLLATION
collate_tests4
.
collate_coll9
(
LOCALE
=
'C'
);
REVOKE
USAGE
ON
SCHEMA
collate_tests4
FROM
regress_rol_col1
;
SET
ROLE
regress_rol_col1
;
ALTER
COLLATION
collate_tests4
.
collate_coll9
RENAME
TO
collate_coll9b
;
CREATE
COLLATION
collate_tests4
.
collate_coll10
(
LOCALE
=
'C'
);
RESET
ROLE
;
DROP
SCHEMA
collate_tests4
CASCADE
;
--
--
-- Clean up. Many of these table names will be re-used if the user is
-- Clean up. Many of these table names will be re-used if the user is
...
@@ -282,4 +238,3 @@ DROP SCHEMA collate_tests4 CASCADE;
...
@@ -282,4 +238,3 @@ DROP SCHEMA collate_tests4 CASCADE;
-- must get rid of them.
-- must get rid of them.
--
--
DROP
SCHEMA
collate_tests
CASCADE
;
DROP
SCHEMA
collate_tests
CASCADE
;
DROP
ROLE
regress_rol_col1
;
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