Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8ebf1a3

Browse files
committed
Remove fairly useless mixed-case identifier test that causes locale
dependencies.
1 parent8d320b6 commit8ebf1a3

File tree

2 files changed

+27
-49
lines changed

2 files changed

+27
-49
lines changed

‎src/test/regress/expected/foreign_data.out

Lines changed: 27 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,6 @@ CREATE SERVER s3 TYPE 'oracle' FOREIGN DATA WRAPPER foo;
284284
CREATE SERVER s4 TYPE 'oracle' FOREIGN DATA WRAPPER foo OPTIONS (host 'a', dbname 'b');
285285
CREATE SERVER s5 VERSION '15.0' FOREIGN DATA WRAPPER foo;
286286
CREATE SERVER s6 VERSION '16.0' FOREIGN DATA WRAPPER foo OPTIONS (host 'a', dbname 'b');
287-
CREATE SERVER "S6" FOREIGN DATA WRAPPER foo OPTIONS (mixed_case_names 'true');
288287
CREATE SERVER s7 TYPE 'oracle' VERSION '17.0' FOREIGN DATA WRAPPER foo OPTIONS (host 'a', dbname 'b');
289288
CREATE SERVER s8 FOREIGN DATA WRAPPER postgresql OPTIONS (foo '1'); -- ERROR
290289
ERROR: invalid option "foo" to server
@@ -294,7 +293,6 @@ CREATE SERVER s8 FOREIGN DATA WRAPPER postgresql OPTIONS (host 'localhost', dbna
294293
List of foreign servers
295294
Name | Owner | Foreign-data wrapper | Access privileges | Type | Version | Options
296295
------+-------------------+----------------------+-------------------+--------+---------+------------------------------
297-
S6 | foreign_data_user | foo | | | | {mixed_case_names=true}
298296
s1 | foreign_data_user | foo | | | |
299297
s2 | foreign_data_user | foo | | | | {host=a,dbname=b}
300298
s3 | foreign_data_user | foo | | oracle | |
@@ -303,7 +301,7 @@ CREATE SERVER s8 FOREIGN DATA WRAPPER postgresql OPTIONS (host 'localhost', dbna
303301
s6 | foreign_data_user | foo | | | 16.0 | {host=a,dbname=b}
304302
s7 | foreign_data_user | foo | | oracle | 17.0 | {host=a,dbname=b}
305303
s8 | foreign_data_user | postgresql | | | | {host=localhost,dbname=s8db}
306-
(9 rows)
304+
(8 rows)
307305

308306
SET ROLE regress_test_role;
309307
CREATE SERVER st1 FOREIGN DATA WRAPPER foo; -- ERROR: no usage on FDW
@@ -317,7 +315,6 @@ RESET ROLE;
317315
List of foreign servers
318316
Name | Owner | Foreign-data wrapper | Access privileges | Type | Version | Options
319317
------+-------------------+----------------------+-------------------+--------+---------+------------------------------
320-
S6 | foreign_data_user | foo | | | | {mixed_case_names=true}
321318
s1 | foreign_data_user | foo | | | |
322319
s2 | foreign_data_user | foo | | | | {host=a,dbname=b}
323320
s3 | foreign_data_user | foo | | oracle | |
@@ -327,7 +324,7 @@ RESET ROLE;
327324
s7 | foreign_data_user | foo | | oracle | 17.0 | {host=a,dbname=b}
328325
s8 | foreign_data_user | postgresql | | | | {host=localhost,dbname=s8db}
329326
st1 | regress_test_role | foo | | | |
330-
(10 rows)
327+
(9 rows)
331328

332329
REVOKE USAGE ON FOREIGN DATA WRAPPER foo FROM regress_test_role;
333330
GRANT USAGE ON FOREIGN DATA WRAPPER foo TO regress_test_indirect;
@@ -342,7 +339,6 @@ CREATE SERVER st2 FOREIGN DATA WRAPPER foo;
342339
List of foreign servers
343340
Name | Owner | Foreign-data wrapper | Access privileges | Type | Version | Options
344341
------+-------------------+----------------------+-------------------+--------+---------+------------------------------
345-
S6 | foreign_data_user | foo | | | | {mixed_case_names=true}
346342
s1 | foreign_data_user | foo | | | |
347343
s2 | foreign_data_user | foo | | | | {host=a,dbname=b}
348344
s3 | foreign_data_user | foo | | oracle | |
@@ -353,7 +349,7 @@ CREATE SERVER st2 FOREIGN DATA WRAPPER foo;
353349
s8 | foreign_data_user | postgresql | | | | {host=localhost,dbname=s8db}
354350
st1 | regress_test_role | foo | | | |
355351
st2 | regress_test_role | foo | | | |
356-
(11 rows)
352+
(10 rows)
357353

358354
RESET ROLE;
359355
REVOKE regress_test_indirect FROM regress_test_role;
@@ -373,7 +369,6 @@ GRANT USAGE ON FOREIGN SERVER s6 TO regress_test_role2 WITH GRANT OPTION;
373369
List of foreign servers
374370
Name | Owner | Foreign-data wrapper | Access privileges | Type | Version | Options
375371
------+-------------------+----------------------+-----------------------------------------+--------+---------+------------------------------
376-
S6 | foreign_data_user | foo | | | | {mixed_case_names=true}
377372
s1 | foreign_data_user | foo | foreign_data_user=U/foreign_data_user | | 1.0 | {servername=s1}
378373
: regress_test_role=U/foreign_data_user
379374
s2 | foreign_data_user | foo | | | 1.1 | {host=a,dbname=b}
@@ -386,7 +381,7 @@ GRANT USAGE ON FOREIGN SERVER s6 TO regress_test_role2 WITH GRANT OPTION;
386381
s8 | foreign_data_user | postgresql | | | | {host=localhost,dbname=s8db}
387382
st1 | regress_test_role | foo | | | |
388383
st2 | regress_test_role | foo | | | |
389-
(11 rows)
384+
(10 rows)
390385

391386
SET ROLE regress_test_role;
392387
ALTER SERVER s1 VERSION '1.1'; -- ERROR
@@ -425,7 +420,6 @@ access to foreign-data wrapper foo
425420
List of foreign servers
426421
Name | Owner | Foreign-data wrapper | Access privileges | Type | Version | Options
427422
------+-----------------------+----------------------+-----------------------------------------+--------+---------+---------------------------------
428-
S6 | foreign_data_user | foo | | | | {mixed_case_names=true}
429423
s1 | regress_test_indirect | foo | foreign_data_user=U/foreign_data_user | | 1.1 | {servername=s1}
430424
: regress_test_role=U/foreign_data_user
431425
s2 | foreign_data_user | foo | | | 1.1 | {host=a,dbname=b}
@@ -438,7 +432,7 @@ access to foreign-data wrapper foo
438432
s8 | foreign_data_user | postgresql | | | | {dbname=db1,connect_timeout=30}
439433
st1 | regress_test_role | foo | | | |
440434
st2 | regress_test_role | foo | | | |
441-
(11 rows)
435+
(10 rows)
442436

443437
-- DROP SERVER
444438
DROP SERVER nonexistent; -- ERROR
@@ -449,7 +443,6 @@ NOTICE: server "nonexistent" does not exist, skipping
449443
List of foreign servers
450444
Name | Owner | Foreign-data wrapper
451445
------+-----------------------+----------------------
452-
S6 | foreign_data_user | foo
453446
s1 | regress_test_indirect | foo
454447
s2 | foreign_data_user | foo
455448
s3 | foreign_data_user | foo
@@ -460,7 +453,7 @@ NOTICE: server "nonexistent" does not exist, skipping
460453
s8 | foreign_data_user | postgresql
461454
st1 | regress_test_role | foo
462455
st2 | regress_test_role | foo
463-
(11 rows)
456+
(10 rows)
464457

465458
SET ROLE regress_test_role;
466459
DROP SERVER s2; -- ERROR
@@ -471,7 +464,6 @@ RESET ROLE;
471464
List of foreign servers
472465
Name | Owner | Foreign-data wrapper
473466
------+-------------------+----------------------
474-
S6 | foreign_data_user | foo
475467
s2 | foreign_data_user | foo
476468
s3 | foreign_data_user | foo
477469
s4 | foreign_data_user | foo
@@ -481,7 +473,7 @@ RESET ROLE;
481473
s8 | foreign_data_user | postgresql
482474
st1 | regress_test_role | foo
483475
st2 | regress_test_role | foo
484-
(10 rows)
476+
(9 rows)
485477

486478
ALTER SERVER s2 OWNER TO regress_test_role;
487479
SET ROLE regress_test_role;
@@ -491,7 +483,6 @@ RESET ROLE;
491483
List of foreign servers
492484
Name | Owner | Foreign-data wrapper
493485
------+-------------------+----------------------
494-
S6 | foreign_data_user | foo
495486
s3 | foreign_data_user | foo
496487
s4 | foreign_data_user | foo
497488
s5 | foreign_data_user | foo
@@ -500,7 +491,7 @@ RESET ROLE;
500491
s8 | foreign_data_user | postgresql
501492
st1 | regress_test_role | foo
502493
st2 | regress_test_role | foo
503-
(9 rows)
494+
(8 rows)
504495

505496
CREATE USER MAPPING FOR current_user SERVER s3;
506497
\deu
@@ -520,15 +511,14 @@ NOTICE: drop cascades to user mapping for foreign_data_user
520511
List of foreign servers
521512
Name | Owner | Foreign-data wrapper
522513
------+-------------------+----------------------
523-
S6 | foreign_data_user | foo
524514
s4 | foreign_data_user | foo
525515
s5 | foreign_data_user | foo
526516
s6 | foreign_data_user | foo
527517
s7 | foreign_data_user | foo
528518
s8 | foreign_data_user | postgresql
529519
st1 | regress_test_role | foo
530520
st2 | regress_test_role | foo
531-
(8 rows)
521+
(7 rows)
532522

533523
\deu
534524
List of user mappings
@@ -559,7 +549,6 @@ ERROR: must be owner of foreign server s7
559549
CREATE USER MAPPING FOR public SERVER s8; -- ERROR
560550
ERROR: must be owner of foreign server s8
561551
RESET ROLE;
562-
CREATE USER MAPPING FOR current_user SERVER "S6" OPTIONS (username 'test_mixed_case');
563552
ALTER SERVER st1 OWNER TO regress_test_indirect;
564553
SET ROLE regress_test_role;
565554
CREATE USER MAPPING FOR current_user SERVER st1 OPTIONS (username 'bob', password 'boo');
@@ -569,15 +558,14 @@ RESET ROLE;
569558
List of user mappings
570559
Server | Username
571560
--------+-------------------
572-
S6 | foreign_data_user
573561
s4 | foreign_data_user
574562
s4 | public
575563
s5 | regress_test_role
576564
s6 | regress_test_role
577565
s8 | foreign_data_user
578566
st1 | public
579567
st1 | regress_test_role
580-
(8 rows)
568+
(7 rows)
581569

582570
-- ALTER USER MAPPING
583571
ALTER USER MAPPING FOR bob SERVER s4 OPTIONS (gotcha 'true'); -- ERROR
@@ -600,15 +588,14 @@ RESET ROLE;
600588
List of user mappings
601589
Server | Username | Options
602590
--------+-------------------+-----------------------------
603-
S6 | foreign_data_user | {username=test_mixed_case}
604591
s4 | foreign_data_user |
605592
s4 | public | {"mapping=is public"}
606593
s5 | regress_test_role | {modified=1}
607594
s6 | regress_test_role | {username=test}
608595
s8 | foreign_data_user | {password=public}
609596
st1 | public | {modified=1}
610597
st1 | regress_test_role | {username=bob,password=boo}
611-
(8 rows)
598+
(7 rows)
612599

613600
-- DROP USER MAPPING
614601
DROP USER MAPPING FOR bob SERVER s4; -- ERROR
@@ -633,7 +620,6 @@ DROP SERVER s7;
633620
List of user mappings
634621
Server | Username
635622
--------+-------------------
636-
S6 | foreign_data_user
637623
s4 | foreign_data_user
638624
s4 | public
639625
s5 | regress_test_role
@@ -642,7 +628,7 @@ DROP SERVER s7;
642628
s8 | public
643629
st1 | public
644630
st1 | regress_test_role
645-
(9 rows)
631+
(8 rows)
646632

647633
-- Information schema
648634
SELECT * FROM information_schema.foreign_data_wrappers ORDER BY 1, 2;
@@ -662,53 +648,49 @@ SELECT * FROM information_schema.foreign_data_wrapper_options ORDER BY 1, 2, 3;
662648
SELECT * FROM information_schema.foreign_servers ORDER BY 1, 2;
663649
foreign_server_catalog | foreign_server_name | foreign_data_wrapper_catalog | foreign_data_wrapper_name | foreign_server_type | foreign_server_version | authorization_identifier
664650
------------------------+---------------------+------------------------------+---------------------------+---------------------+------------------------+--------------------------
665-
regression | S6 | regression | foo | | | foreign_data_user
666651
regression | s4 | regression | foo | oracle | | foreign_data_user
667652
regression | s5 | regression | foo | | 15.0 | regress_test_role
668653
regression | s6 | regression | foo | | 16.0 | regress_test_indirect
669654
regression | s8 | regression | postgresql | | | foreign_data_user
670655
regression | st1 | regression | foo | | | regress_test_indirect
671656
regression | st2 | regression | foo | | | regress_test_role
672-
(7 rows)
657+
(6 rows)
673658

674659
SELECT * FROM information_schema.foreign_server_options ORDER BY 1, 2, 3;
675-
foreign_server_catalog | foreign_server_name | option_name | option_value
676-
------------------------+---------------------+------------------+--------------
677-
regression | S6 | mixed_case_names | true
678-
regression | s4 | dbname | b
679-
regression | s4 | host | a
680-
regression | s6 | dbname | b
681-
regression | s6 | host | a
682-
regression | s8 | connect_timeout | 30
683-
regression | s8 | dbname | db1
684-
(7 rows)
660+
foreign_server_catalog | foreign_server_name | option_name | option_value
661+
------------------------+---------------------+-----------------+--------------
662+
regression | s4 | dbname | b
663+
regression | s4 | host | a
664+
regression | s6 | dbname | b
665+
regression | s6 | host | a
666+
regression | s8 | connect_timeout | 30
667+
regression | s8 | dbname | db1
668+
(6 rows)
685669

686670
SELECT * FROM information_schema.user_mappings ORDER BY 1, 2, 3;
687671
authorization_identifier | foreign_server_catalog | foreign_server_name
688672
--------------------------+------------------------+---------------------
689673
PUBLIC | regression | s4
690674
PUBLIC | regression | s8
691675
PUBLIC | regression | st1
692-
foreign_data_user | regression | S6
693676
foreign_data_user | regression | s4
694677
foreign_data_user | regression | s8
695678
regress_test_role | regression | s5
696679
regress_test_role | regression | s6
697680
regress_test_role | regression | st1
698-
(9 rows)
681+
(8 rows)
699682

700683
SELECT * FROM information_schema.user_mapping_options ORDER BY 1, 2, 3, 4;
701-
authorization_identifier | foreign_server_catalog | foreign_server_name | option_name |option_value
702-
--------------------------+------------------------+---------------------+-------------+-----------------
684+
authorization_identifier | foreign_server_catalog | foreign_server_name | option_name | option_value
685+
--------------------------+------------------------+---------------------+-------------+--------------
703686
PUBLIC | regression | s4 | mapping | is public
704687
PUBLIC | regression | st1 | modified | 1
705-
foreign_data_user | regression | S6 | username | test_mixed_case
706688
foreign_data_user | regression | s8 | password | public
707689
regress_test_role | regression | s5 | modified | 1
708690
regress_test_role | regression | s6 | username | test
709691
regress_test_role | regression | st1 | password | boo
710692
regress_test_role | regression | st1 | username | bob
711-
(8 rows)
693+
(7 rows)
712694

713695
SELECT * FROM information_schema.usage_privileges WHERE object_type LIKE 'FOREIGN%' ORDER BY 1, 2, 3, 4, 5;
714696
grantor | grantee | object_catalog | object_schema | object_name | object_type | privilege_type | is_grantable
@@ -971,12 +953,10 @@ NOTICE: drop cascades to user mapping for public
971953
DROP SERVER st2;
972954
DROP USER MAPPING FOR regress_test_role SERVER s6;
973955
DROP FOREIGN DATA WRAPPER foo CASCADE;
974-
NOTICE: drop cascades to6 other objects
956+
NOTICE: drop cascades to4 other objects
975957
DETAIL: drop cascades to server s4
976958
drop cascades to user mapping for foreign_data_user
977959
drop cascades to server s6
978-
drop cascades to server S6
979-
drop cascades to user mapping for foreign_data_user
980960
drop cascades to server s9
981961
DROP SERVER s8 CASCADE;
982962
NOTICE: drop cascades to 2 other objects

‎src/test/regress/sql/foreign_data.sql

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,6 @@ CREATE SERVER s3 TYPE 'oracle' FOREIGN DATA WRAPPER foo;
126126
CREATE SERVER s4 TYPE'oracle' FOREIGN DATA WRAPPER foo OPTIONS (host'a', dbname'b');
127127
CREATE SERVER s5 VERSION'15.0' FOREIGN DATA WRAPPER foo;
128128
CREATE SERVER s6 VERSION'16.0' FOREIGN DATA WRAPPER foo OPTIONS (host'a', dbname'b');
129-
CREATE SERVER"S6" FOREIGN DATA WRAPPER foo OPTIONS (mixed_case_names'true');
130129
CREATE SERVER s7 TYPE'oracle' VERSION'17.0' FOREIGN DATA WRAPPER foo OPTIONS (host'a', dbname'b');
131130
CREATE SERVER s8 FOREIGN DATA WRAPPER postgresql OPTIONS (foo'1');-- ERROR
132131
CREATE SERVER s8 FOREIGN DATA WRAPPER postgresql OPTIONS (host'localhost', dbname's8db');
@@ -224,7 +223,6 @@ CREATE USER MAPPING FOR current_user SERVER s6 OPTIONS (username 'test');
224223
CREATEUSERMAPPING FORcurrent_user SERVER s7;-- ERROR
225224
CREATEUSERMAPPING FOR public SERVER s8;-- ERROR
226225
RESET ROLE;
227-
CREATEUSERMAPPING FORcurrent_user SERVER"S6" OPTIONS (username'test_mixed_case');
228226

229227
ALTER SERVER st1 OWNER TO regress_test_indirect;
230228
SET ROLE regress_test_role;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp