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
8cd37552
Commit
8cd37552
authored
16 years ago
by
Peter Eisentraut
Browse files
Options
Downloads
Patches
Plain Diff
Tweak the regression test case so that the ordering of numbers vs. letters
doesn't matter. This fixes failures in the Czech locale.
parent
05a7db05
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/expected/foreign_data.out
+43
-43
43 additions, 43 deletions
src/test/regress/expected/foreign_data.out
src/test/regress/sql/foreign_data.sql
+11
-11
11 additions, 11 deletions
src/test/regress/sql/foreign_data.sql
with
54 additions
and
54 deletions
src/test/regress/expected/foreign_data.out
+
43
−
43
View file @
8cd37552
...
...
@@ -301,12 +301,12 @@ CREATE SERVER s8 FOREIGN DATA WRAPPER postgresql OPTIONS (host 'localhost', dbna
(8 rows)
SET ROLE regress_test_role;
CREATE SERVER
s
t1 FOREIGN DATA WRAPPER foo; -- ERROR: no usage on FDW
CREATE SERVER t1 FOREIGN DATA WRAPPER foo; -- ERROR: no usage on FDW
ERROR: permission denied for foreign-data wrapper foo
RESET ROLE;
GRANT USAGE ON FOREIGN DATA WRAPPER foo TO regress_test_role;
SET ROLE regress_test_role;
CREATE SERVER
s
t1 FOREIGN DATA WRAPPER foo;
CREATE SERVER t1 FOREIGN DATA WRAPPER foo;
RESET ROLE;
\des+
List of foreign servers
...
...
@@ -320,18 +320,18 @@ RESET ROLE;
s6 | foreign_data_user | foo | | | 16.0 | {host=a,dbname=b}
s7 | foreign_data_user | foo | | oracle | 17.0 | {host=a,dbname=b}
s8 | foreign_data_user | postgresql | | | | {host=localhost,dbname=s8db}
s
t1 | regress_test_role | foo | | | |
t1
| regress_test_role | foo | | | |
(9 rows)
REVOKE USAGE ON FOREIGN DATA WRAPPER foo FROM regress_test_role;
GRANT USAGE ON FOREIGN DATA WRAPPER foo TO regress_test_indirect;
SET ROLE regress_test_role;
CREATE SERVER
s
t2 FOREIGN DATA WRAPPER foo; -- ERROR
CREATE SERVER t2 FOREIGN DATA WRAPPER foo; -- ERROR
ERROR: permission denied for foreign-data wrapper foo
RESET ROLE;
GRANT regress_test_indirect TO regress_test_role;
SET ROLE regress_test_role;
CREATE SERVER
s
t2 FOREIGN DATA WRAPPER foo;
CREATE SERVER t2 FOREIGN DATA WRAPPER foo;
\des+
List of foreign servers
Name | Owner | Foreign-data wrapper | Access privileges | Type | Version | Options
...
...
@@ -344,8 +344,8 @@ CREATE SERVER st2 FOREIGN DATA WRAPPER foo;
s6 | foreign_data_user | foo | | | 16.0 | {host=a,dbname=b}
s7 | foreign_data_user | foo | | oracle | 17.0 | {host=a,dbname=b}
s8 | foreign_data_user | postgresql | | | | {host=localhost,dbname=s8db}
s
t1 | regress_test_role | foo | | | |
s
t2 | regress_test_role | foo | | | |
t1
| regress_test_role | foo | | | |
t2
| regress_test_role | foo | | | |
(10 rows)
RESET ROLE;
...
...
@@ -376,8 +376,8 @@ GRANT USAGE ON FOREIGN SERVER s6 TO regress_test_role2 WITH GRANT OPTION;
: regress_test_role2=U*/foreign_data_user
s7 | foreign_data_user | foo | | oracle | 17.0 | {host=a,dbname=b}
s8 | foreign_data_user | postgresql | | | | {host=localhost,dbname=s8db}
s
t1 | regress_test_role | foo | | | |
s
t2 | regress_test_role | foo | | | |
t1
| regress_test_role | foo | | | |
t2
| regress_test_role | foo | | | |
(10 rows)
SET ROLE regress_test_role;
...
...
@@ -427,8 +427,8 @@ access to foreign-data wrapper foo
: regress_test_role2=U*/foreign_data_user
s7 | foreign_data_user | foo | | oracle | 17.0 | {host=a,dbname=b}
s8 | foreign_data_user | postgresql | | | | {dbname=db1,connect_timeout=30}
s
t1 | regress_test_role | foo | | | |
s
t2 | regress_test_role | foo | | | |
t1
| regress_test_role | foo | | | |
t2
| regress_test_role | foo | | | |
(10 rows)
-- DROP SERVER
...
...
@@ -448,8 +448,8 @@ NOTICE: server "nonexistent" does not exist, skipping
s6 | foreign_data_user | foo
s7 | foreign_data_user | foo
s8 | foreign_data_user | postgresql
s
t1 | regress_test_role | foo
s
t2 | regress_test_role | foo
t1
| regress_test_role | foo
t2
| regress_test_role | foo
(10 rows)
SET ROLE regress_test_role;
...
...
@@ -468,8 +468,8 @@ RESET ROLE;
s6 | foreign_data_user | foo
s7 | foreign_data_user | foo
s8 | foreign_data_user | postgresql
s
t1 | regress_test_role | foo
s
t2 | regress_test_role | foo
t1
| regress_test_role | foo
t2
| regress_test_role | foo
(9 rows)
ALTER SERVER s2 OWNER TO regress_test_role;
...
...
@@ -486,8 +486,8 @@ RESET ROLE;
s6 | foreign_data_user | foo
s7 | foreign_data_user | foo
s8 | foreign_data_user | postgresql
s
t1 | regress_test_role | foo
s
t2 | regress_test_role | foo
t1
| regress_test_role | foo
t2
| regress_test_role | foo
(8 rows)
CREATE USER MAPPING FOR current_user SERVER s3;
...
...
@@ -513,8 +513,8 @@ NOTICE: drop cascades to user mapping for foreign_data_user
s6 | foreign_data_user | foo
s7 | foreign_data_user | foo
s8 | foreign_data_user | postgresql
s
t1 | regress_test_role | foo
s
t2 | regress_test_role | foo
t1
| regress_test_role | foo
t2
| regress_test_role | foo
(7 rows)
\deu
...
...
@@ -546,10 +546,10 @@ ERROR: permission denied for foreign server s7
CREATE USER MAPPING FOR public SERVER s8; -- ERROR
ERROR: must be owner of foreign server s8
RESET ROLE;
ALTER SERVER
s
t1 OWNER TO regress_test_indirect;
ALTER SERVER t1 OWNER TO regress_test_indirect;
SET ROLE regress_test_role;
CREATE USER MAPPING FOR current_user SERVER
s
t1 OPTIONS (username 'bob', password 'boo');
CREATE USER MAPPING FOR public SERVER
s
t1;
CREATE USER MAPPING FOR current_user SERVER t1 OPTIONS (username 'bob', password 'boo');
CREATE USER MAPPING FOR public SERVER t1;
RESET ROLE;
\deu
List of user mappings
...
...
@@ -560,8 +560,8 @@ RESET ROLE;
s5 | regress_test_role
s6 | regress_test_role
s8 | foreign_data_user
s
t1 | public
s
t1 | regress_test_role
t1
| public
t1
| regress_test_role
(7 rows)
-- ALTER USER MAPPING
...
...
@@ -579,7 +579,7 @@ SET ROLE regress_test_role;
ALTER USER MAPPING FOR current_user SERVER s5 OPTIONS (ADD modified '1');
ALTER USER MAPPING FOR public SERVER s4 OPTIONS (ADD modified '1'); -- ERROR
ERROR: must be owner of foreign server s4
ALTER USER MAPPING FOR public SERVER
s
t1 OPTIONS (ADD modified '1');
ALTER USER MAPPING FOR public SERVER t1 OPTIONS (ADD modified '1');
RESET ROLE;
\deu+
List of user mappings
...
...
@@ -590,8 +590,8 @@ RESET ROLE;
s5 | regress_test_role | {modified=1}
s6 | regress_test_role | {username=test}
s8 | foreign_data_user | {password=public}
s
t1 | public | {modified=1}
s
t1 | regress_test_role | {username=bob,password=boo}
t1
| public | {modified=1}
t1
| regress_test_role | {username=bob,password=boo}
(7 rows)
-- DROP USER MAPPING
...
...
@@ -623,8 +623,8 @@ DROP SERVER s7;
s6 | regress_test_role
s8 | foreign_data_user
s8 | public
s
t1 | public
s
t1 | regress_test_role
t1
| public
t1
| regress_test_role
(8 rows)
-- Information schema
...
...
@@ -649,8 +649,8 @@ SELECT * FROM information_schema.foreign_servers ORDER BY 1, 2;
regression | s5 | regression | foo | | 15.0 | regress_test_role
regression | s6 | regression | foo | | 16.0 | regress_test_indirect
regression | s8 | regression | postgresql | | | foreign_data_user
regression |
s
t1 | regression | foo | | | regress_test_indirect
regression |
s
t2 | regression | foo | | | regress_test_role
regression | t1
| regression | foo | | | regress_test_indirect
regression | t2
| regression | foo | | | regress_test_role
(6 rows)
SELECT * FROM information_schema.foreign_server_options ORDER BY 1, 2, 3;
...
...
@@ -671,10 +671,10 @@ SELECT * FROM information_schema.user_mappings ORDER BY lower(authorization_iden
foreign_data_user | regression | s8
PUBLIC | regression | s4
PUBLIC | regression | s8
PUBLIC | regression |
s
t1
PUBLIC | regression | t1
regress_test_role | regression | s5
regress_test_role | regression | s6
regress_test_role | regression |
s
t1
regress_test_role | regression | t1
(8 rows)
SELECT * FROM information_schema.user_mapping_options ORDER BY lower(authorization_identifier), 2, 3, 4;
...
...
@@ -682,11 +682,11 @@ SELECT * FROM information_schema.user_mapping_options ORDER BY lower(authorizati
--------------------------+------------------------+---------------------+-------------+--------------
foreign_data_user | regression | s8 | password | public
PUBLIC | regression | s4 | mapping | is public
PUBLIC | regression |
s
t1 | modified | 1
PUBLIC | regression | t1
| modified | 1
regress_test_role | regression | s5 | modified | 1
regress_test_role | regression | s6 | username | test
regress_test_role | regression |
s
t1 | password | boo
regress_test_role | regression |
s
t1 | username | bob
regress_test_role | regression | t1
| password | boo
regress_test_role | regression | t1
| username | bob
(7 rows)
SELECT * FROM information_schema.usage_privileges WHERE object_type LIKE 'FOREIGN%' ORDER BY 1, 2, 3, 4, 5;
...
...
@@ -711,11 +711,11 @@ SET ROLE regress_test_role;
SELECT * FROM information_schema.user_mapping_options ORDER BY 1, 2, 3, 4;
authorization_identifier | foreign_server_catalog | foreign_server_name | option_name | option_value
--------------------------+------------------------+---------------------+-------------+--------------
PUBLIC | regression |
s
t1 | modified | 1
PUBLIC | regression | t1
| modified | 1
regress_test_role | regression | s5 | modified | 1
regress_test_role | regression | s6 | username | test
regress_test_role | regression |
s
t1 | password | boo
regress_test_role | regression |
s
t1 | username | bob
regress_test_role | regression | t1
| password | boo
regress_test_role | regression | t1
| username | bob
(5 rows)
SELECT * FROM information_schema.usage_privileges WHERE object_type LIKE 'FOREIGN%' ORDER BY 1, 2, 3, 4, 5;
...
...
@@ -732,7 +732,7 @@ SELECT * FROM information_schema.role_usage_grants WHERE object_type LIKE 'FOREI
foreign_data_user | regress_test_role2 | regression | | s6 | FOREIGN SERVER | USAGE | YES
(2 rows)
DROP USER MAPPING FOR current_user SERVER
s
t1;
DROP USER MAPPING FOR current_user SERVER t1;
SET ROLE regress_test_role2;
SELECT * FROM information_schema.user_mapping_options ORDER BY 1, 2, 3, 4;
authorization_identifier | foreign_server_catalog | foreign_server_name | option_name | option_value
...
...
@@ -946,12 +946,12 @@ access to foreign-data wrapper foo
owner of user mapping for regress_test_role
owner of user mapping for regress_test_role
owner of server s5
owner of server
s
t2
owner of server t2
DROP SERVER s5 CASCADE;
NOTICE: drop cascades to user mapping for regress_test_role
DROP SERVER
s
t1 CASCADE;
DROP SERVER t1 CASCADE;
NOTICE: drop cascades to user mapping for public
DROP SERVER
s
t2;
DROP SERVER t2;
DROP USER MAPPING FOR regress_test_role SERVER s6;
DROP FOREIGN DATA WRAPPER foo CASCADE;
NOTICE: drop cascades to 5 other objects
...
...
This diff is collapsed.
Click to expand it.
src/test/regress/sql/foreign_data.sql
+
11
−
11
View file @
8cd37552
...
...
@@ -127,22 +127,22 @@ CREATE SERVER s8 FOREIGN DATA WRAPPER postgresql OPTIONS (foo '1'); -- ERROR
CREATE
SERVER
s8
FOREIGN
DATA
WRAPPER
postgresql
OPTIONS
(
host
'localhost'
,
dbname
's8db'
);
\
des
+
SET
ROLE
regress_test_role
;
CREATE
SERVER
s
t1
FOREIGN
DATA
WRAPPER
foo
;
-- ERROR: no usage on FDW
CREATE
SERVER
t1
FOREIGN
DATA
WRAPPER
foo
;
-- ERROR: no usage on FDW
RESET
ROLE
;
GRANT
USAGE
ON
FOREIGN
DATA
WRAPPER
foo
TO
regress_test_role
;
SET
ROLE
regress_test_role
;
CREATE
SERVER
s
t1
FOREIGN
DATA
WRAPPER
foo
;
CREATE
SERVER
t1
FOREIGN
DATA
WRAPPER
foo
;
RESET
ROLE
;
\
des
+
REVOKE
USAGE
ON
FOREIGN
DATA
WRAPPER
foo
FROM
regress_test_role
;
GRANT
USAGE
ON
FOREIGN
DATA
WRAPPER
foo
TO
regress_test_indirect
;
SET
ROLE
regress_test_role
;
CREATE
SERVER
s
t2
FOREIGN
DATA
WRAPPER
foo
;
-- ERROR
CREATE
SERVER
t2
FOREIGN
DATA
WRAPPER
foo
;
-- ERROR
RESET
ROLE
;
GRANT
regress_test_indirect
TO
regress_test_role
;
SET
ROLE
regress_test_role
;
CREATE
SERVER
s
t2
FOREIGN
DATA
WRAPPER
foo
;
CREATE
SERVER
t2
FOREIGN
DATA
WRAPPER
foo
;
\
des
+
RESET
ROLE
;
REVOKE
regress_test_indirect
FROM
regress_test_role
;
...
...
@@ -220,10 +220,10 @@ CREATE USER MAPPING FOR current_user SERVER s7; -- ERROR
CREATE
USER
MAPPING
FOR
public
SERVER
s8
;
-- ERROR
RESET
ROLE
;
ALTER
SERVER
s
t1
OWNER
TO
regress_test_indirect
;
ALTER
SERVER
t1
OWNER
TO
regress_test_indirect
;
SET
ROLE
regress_test_role
;
CREATE
USER
MAPPING
FOR
current_user
SERVER
s
t1
OPTIONS
(
username
'bob'
,
password
'boo'
);
CREATE
USER
MAPPING
FOR
public
SERVER
s
t1
;
CREATE
USER
MAPPING
FOR
current_user
SERVER
t1
OPTIONS
(
username
'bob'
,
password
'boo'
);
CREATE
USER
MAPPING
FOR
public
SERVER
t1
;
RESET
ROLE
;
\
deu
...
...
@@ -236,7 +236,7 @@ ALTER USER MAPPING FOR current_user SERVER s8 OPTIONS (DROP user, SET password '
SET
ROLE
regress_test_role
;
ALTER
USER
MAPPING
FOR
current_user
SERVER
s5
OPTIONS
(
ADD
modified
'1'
);
ALTER
USER
MAPPING
FOR
public
SERVER
s4
OPTIONS
(
ADD
modified
'1'
);
-- ERROR
ALTER
USER
MAPPING
FOR
public
SERVER
s
t1
OPTIONS
(
ADD
modified
'1'
);
ALTER
USER
MAPPING
FOR
public
SERVER
t1
OPTIONS
(
ADD
modified
'1'
);
RESET
ROLE
;
\
deu
+
...
...
@@ -268,7 +268,7 @@ SET ROLE regress_test_role;
SELECT
*
FROM
information_schema
.
user_mapping_options
ORDER
BY
1
,
2
,
3
,
4
;
SELECT
*
FROM
information_schema
.
usage_privileges
WHERE
object_type
LIKE
'FOREIGN%'
ORDER
BY
1
,
2
,
3
,
4
,
5
;
SELECT
*
FROM
information_schema
.
role_usage_grants
WHERE
object_type
LIKE
'FOREIGN%'
ORDER
BY
1
,
2
,
3
,
4
,
5
;
DROP
USER
MAPPING
FOR
current_user
SERVER
s
t1
;
DROP
USER
MAPPING
FOR
current_user
SERVER
t1
;
SET
ROLE
regress_test_role2
;
SELECT
*
FROM
information_schema
.
user_mapping_options
ORDER
BY
1
,
2
,
3
,
4
;
RESET
ROLE
;
...
...
@@ -369,8 +369,8 @@ RESET ROLE;
-- Cleanup
DROP
ROLE
regress_test_role
;
-- ERROR
DROP
SERVER
s5
CASCADE
;
DROP
SERVER
s
t1
CASCADE
;
DROP
SERVER
s
t2
;
DROP
SERVER
t1
CASCADE
;
DROP
SERVER
t2
;
DROP
USER
MAPPING
FOR
regress_test_role
SERVER
s6
;
DROP
FOREIGN
DATA
WRAPPER
foo
CASCADE
;
DROP
SERVER
s8
CASCADE
;
...
...
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