-- -- Test foreign-data wrapper and server management. --
-- directory paths and dlsuffix are passed to us in environment variables
\getenv libdir PG_LIBDIR
\getenv dlsuffix
sl/regress dlsuffix
test_fdw_handler)
RETURNS fdw_handler AS :'regresslib', 'test_fdw_handler'
LANGUAGE C;
-- Clean up in case a prior regression run failed
-- Suppress NOTICE messages when roles don't exist SET
SELECTsrvname,srvoptions 'arning'
RESET client_min_messages;
CREATE ROLE regress_foreign_data_user java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 0 ';
CREATE ROLE regress_test_roleFOREIGNDATA foo testing')java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 31
regress_test_role_super; CREATE CREATE ROLE regress_unprivileged_role;
CREATE SELECT fdwnamefdwhandler:egprocjava.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 41 ONCREATEFOREIGN WRAPPERfooVALIDATORpostgresql_fdw_validator CREATEFOREIGNjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
-- At this point we should have 2 built-in wrappers and no servers. CREATE
-- CREATE java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 4 SELECT * FROM pg_user_mappingFOREIGNDATA ;
-- CREATE FOREIGN DATA WRAPPER FOREIGN WRAPPER+ DROPDATA ;
\dew
CREATEFOREIGN DATAWRAPPERDATAWRAPPER test_fdw_handlerjava.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62 FOREIGNDATAjava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 0 CREATEFOREIGNER DATAWRAPPER VALIDATOR postgresql_fdw_validator
DROPFOREIGN java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 11
DATAWRAPPERfoo (esting1testing')-
-- CREATE java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 0
d+
DROPFOREIGN DATA java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 SET ROLE regress_test_role;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
RESETROLE; FOREIGNWRAPPERVALIDATORpostgresql_fdw_validator;
\ DATA fooNO VALIDATOR;
-- HANDLER related checks
FUNCTION java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
dw_handler - CREATEFOREIGN DATA java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
WRAPPER HANDLERjava.lang.StringIndexOutOfBoundsException: Range [62, 61) out of bounds for length 62
-- should preserve dependency on test_fdw_handler
DATAWRAPPER test_fdwVALIDATOR;FOREIGN OPTIONSx1,java.lang.StringIndexOutOfBoundsException: Range [56, 55) out of bounds for length 59 DROP FUNCTION ALTERFOREIGN DATA\+
DROPFOREIGN DATA\+
-- ALTER FOREIGN DATA WRAPPER
DATA DATAWRAPPER(b'';-- ERROR
ALTERFOREIGN DATA\+
DATAWRAPPERfoo bar ALTERSET DATAjava.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 70
\dew+
ALTER ALTER DATA ALTERFOREIGN ( d''java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51 ALTER
dew FOREIGNDATA regress_test_role;-java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
\dew
ALTER java.lang.StringIndexOutOfBoundsException: Range [30, 26) out of bounds for length 64
\+
ALTERFOREIGN DATA WRAPPER foo OPTIONS \+
DATA FOREIGNWRAPPER (D 6;-- ERROR
\dewALTERFOREIGN WRAPPERfoo;
SET ROLE regress_test_role; SETROLEjava.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33 SET ROLE
RESETROLE
\
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Range [26, 5) out of bounds for length 64 ALTER ROLE java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 0 SETFOREIGNDATAWRAPPERfoo ALTER FOREIGNDATA WRAPPER foo (;
RESET
\dew- DATAWRAPPER nonexistent
ALTERFOREIGN DATA WRAPPER foo RENAMETO java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 5
\dew+ ALTERFOREIGN DATA WRAPPER foo1 RENAME RESETLE
-- HANDLER related checks
java.lang.StringIndexOutOfBoundsException: Range [13, 5) out of bounds for length 69 ALTERjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
WRAPPER java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41 DROPFUNCTION)
-- DROP FOREIGN DATA WRAPPER
WRAPPER java.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 47 FOREIGNWRAPPEREXISTS ;
\REATEUSERjava.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 5
DROPDROP ;-- ERROR SET ROLE regress_test_role_super; DROPregress_test_role;
RESET ROLE; DROP ROLE DROP FOREIGN DATA WRAPPER foo DROP FOREIGN DATA WRAPPER foo CASCADE
\dew+
CREATEFOREIGN DATA WRAPPER foo;
DATA
COMMENT ON \eu+ CREATE-- exercise CREATE SERVER current_userSERVER; - ERROR IF s1 foo -o ust
\dew+
\es+
\+ CREATEs4 ' WRAPPERfoo h ',dbname ')java.lang.StringIndexOutOfBoundsException: Index 87 out of bounds for length 87 SET ROLE regress_test_role; DROPFOREIGNDATA CASCADE-- ERROR
; DROPFOREIGN DATA WRAPPER fooCREATEIF CREATE SERVER s8 FOREIGN DATA OPTIONSf 1';-- ERROR
\dew+
\des+
d+
-- exercise CREATE SERVER
SERVER CREATEs4' OPTIONS host '' b)java.lang.StringIndexOutOfBoundsException: Index 88 out of bounds for length 87 FOREIGN WRAPPERfooOPTIONS ("test wrapper"'rue'; CREATE SERVER s1 FOREIGNSETROLE ;
SERVERs1 SERVER ' '.' ') CREATE SERVER IFNOTEXISTS s1 FOREIGN DATA WRAPPER foo; -- No ERROR, just NOTICE SERVER s8 java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 11 FOREIGN oo regress_test_indirect; CREATE SERVER 'racle WRAPPER; CREATE s4 TYPE'' DATA WRAPPER
RESET ROLE ONSETregress_test_role
TA WRAPPERjava.lang.StringIndexOutOfBoundsException: Range [4, 3) out of bounds for length 27 CREATE SERVER
-- ALTER SERVERRESET ROLE
java.lang.StringIndexOutOfBoundsException: Range [25, 5) out of bounds for length 68
java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
SERVER FOREIGNDATA TO
RESET ROLE; GRANTGRANTUSAGE java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 73 SETROLE regress_test_role CREATE \java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
ESET ROLE;
\des
FOREIGNWRAPPER regress_test_role GRANT LEregress_test_rolejava.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27 SETALTER java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 5 SETROLEregress_test_role
ROLE; GRANT regress_test_indirect TO ALTER SERVER s1 OWNER TO regress_test_role2;
s_test_role; CREATE SERVER t2 FOREIGN DATA WRAPPER SERVEROPTIONSconnect_timeout'LTERSERVER ''
\des+
RESET ROLE; REVOKE RESET ;
-- ALTER SERVER ALTER SERVER SETROLE OPTIONS"name rcl'')java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57 ALTER SERVER s0 OPTIONS (aRESETROLE; 1VERSION'0 (ervername'';
SERVER 11; ALTER ROLE regress_test_rolejava.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
RESET ; USAGEONSERVER TOregress_test_role2 GRANTOPTIONjava.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
\s SETALTERjava.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 5
;-- ERROR ALTER SERVER s1 OWNER TO regress_test_role;
DROP java.lang.StringIndexOutOfBoundsException: Range [0, 14) out of bounds for length 11 ALTER SERVER s1 OWNER TO java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 11
s_test_role2 TO regress_test_role; SET ROLE regress_test_role; ALTER SERVER s1 VERSIONALTER OPTIONS;
gress_test_role2--ERROR
RESET ROLE; ALTER ROLE; ALTERSERVERs8 (SETdbname'', ALTER SERVER s8 OPTIONS (connect_timeout '30', SET dbname 'db1', DROP SETROLEregress_test_role
SERVER OWNERTO ;
RESET ROLE;
djava.lang.StringIndexOutOfBoundsException: Range [4, 5) out of bounds for length 4 SET ;
s1 TO regress_test_indirect
RESET ROLE;
WRAPPER ALTER SERVER s1 OWNER TO regress_test_indirect SETGRANTONFOREIGNDATAWRAPPER TOCREATE USER MAPPING FOR public SERVER s4 OPTIONS ("this ')
SERVERs1 OWNER TO regress_test_indirect;
RESET ROLE;
gress_test_indirect;
\desDROPALTER SERVER TO;
ALTER s8 RENAMEtos8new;CREATE MAPPINGFOR SERVERs6 OPTIONS(username 'test');
ALTER CREATE USER
-- DROP SERVER
SERVERnonexistent DROP SERVERALTER SERVER OWNER TO regress_test_indirect
\des\des SET ROLE SET ROLE regress_test_role; -- ERROR DROP SERVER s1;
RESET ROLE;CREATE MAPPING FORpublic SERVER t1;
\es ALTER SERVER s2 OWNER TO regress_test_role;
egress_test_role;
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
RESET ROLE;
\es
E MAPPING current_user SERVER s3;
\eu
SERVERs3
SERVER ;
\des
\deu
-- CREATE USER MAPPING CREATE USER MAPPING USER MAPPING\es CREATE MAPPING current_user SERVER s1; ERROR CREATEUSER MAPPING FORcurrent_user SERVERs4
RMAPPINGFOR s4 -- ERROR duplicate
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 0 CREATE ADE
TEDROP USER user java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38 ALTER SERVERCREATE MAPPING FOR DROP USER MAPPING IF EXISTS FOR SERVER; ALTERUSER EXISTSuser ; SETDROP USER MAPPING EXISTSFOR public SERVER ;
MAPPING current_user ; CREATE USER MAPPING FORcurrent_user java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 27
java.lang.StringIndexOutOfBoundsException: Range [36, 6) out of bounds for length 68 CREATE USER MAPPING RESET
ALTER java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 0 SETROLE ; CREATE USER MAPPING DATA WRAPPERdummyjava.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44 CREATE USER CREATE )SERVER no_server ERROR
RESET ROLE;
\deu
-- ALTER USER MAPPING
USER c1integer1"val1 PRIMARYKEYjava.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
USERMAPPING FOR user SERVER ss4OPTIONS gotcha'rue';CREATEUSER MAPPINGFOR SERVERs6OPTIONS ( '')java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73 ALTER MAPPING public OPTIONS (otcha'') ALTERUSERCREATEFOREIGNTABLEft1( ALTER USER MAPPING FOR1"'')REFERENCES java.lang.StringIndexOutOfBoundsException: Range [50, 11) out of bounds for length 11 SETROLE regress_test_rolejava.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
java.lang.StringIndexOutOfBoundsException: Range [18, 5) out of bounds for length 73
USERMAPPINGFORpublic SERVER s4 OPTIONS (ADD modified '1'); -- ERROR
USER MAPPING t1 (c2 OPTIONS (param2 'al2,param3 val3)
RESET ROLE0OPTIONS delimiter ,, quoteejava.lang.StringIndexOutOfBoundsException: Range [4, 5) out of bounds for length 4
\java.lang.StringIndexOutOfBoundsException: Range [5, 4) out of bounds for length 5
-- DROP USER MAPPING FOR s5OPTIONS (otcha true); -ERROR
SERVERss4 DROP USER MAPPINGALTER MAPPING ',',"e alue) DROPROLE; DROPALTER USERMAPPINGFORcurrent_user (ADDmodified ONCOLUMNft1c'.c1java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37 DROP USER MAPPING IFEXISTSFOR public SERVER s7; CREATE USER MAPPING FOR public SERVERSELECT*ft1
; DROP USER MAPPING FOR public SERVER s8; -- ERROR
DROP SERVER s7;
\deu
-- CREATE FOREIGN TABLE SCHEMA; CREATE DROP USER MAPPING IFEXISTSFOR user SERVER ss4; -- ERROR CREATEFOREIGNTABLE ft1 ()CREATEUNIQUEUSERMAPPINGFOR public java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 41 CREATEFOREIGN java.lang.StringIndexOutOfBoundsException: Range [0, 20) out of bounds for length 15
c1 TE a;
c2 textDROPSERVERs7;
te
) -- CREATE FOREIGN CREATE SCHEMA foreign_sOFFOR0TO(000 ; CREATETABLE i integer ) CREATEFOREIGNTABLE ft1(
PTIONS (aram1"'l1)REFERENCES java.lang.StringIndexOutOfBoundsException: Range [60, 59) out of bounds for length 65
xt ( '' param3'',
c3 date
) SERVER s0 OPTIONS (delimiter ',' LTER lt1ADD java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
)SERVER java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 77
REATE java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
c1 CREATE java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 57
c2text ('al2,param3 val3'java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
datejava.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
) SERVER java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
java.lang.StringIndexOutOfBoundsException: Range [20, 6) out of bounds for length 26
(
c2 CREATE lt1_part1
,
)SERVER OPTIONSjava.lang.StringIndexOutOfBoundsException: Range [20, 11) out of bounds for length 25
,', quote '"' OF java.lang.StringIndexOutOfBoundsException: Range [41, 40) out of bounds for length 64 CREATE FOREIGNTABLE ft_part_1_2 (a INT) SERVERCREATETABLE java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26 ON ft1c ft1c1;
\CR UNIQUEINDEXONlt1 ();
\+ CREATEc3date,
ft1;-- ERROR EXPLAINSELECT * FROM ft1; UNIQUE (c3)
TABLE java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26 CREATEFOREIGNTABLE ft_part1
PARTITION OF lt1 FORPARTITION VALUES 0 ()SERVER; CREATEINDEXON lt1 (a)FOREIGNTABLE s0;
EUNIQUEjava.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 72 TABLElt1DROPTABLElt1java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15 ONTABLE f'
lt1( CREATE TABLE lt1 (a INT'.' CREATEINDEXCOMMENT'
java.lang.StringIndexOutOfBoundsException: Range [14, 6) out of bounds for length 29
PARTITIONOF java.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 59 CREATE SELECT * FROM; -- ERROR ALTEREXPLAIN SELECT*;-- ERROR DROPFOREIGNTABLE
UNIQUE () ALTERTABLE lt1 ADDPRIMARYTABLEft1java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 29 CREATEFOREIGNTABLE ALTER FOREIGN TABLE ft1 integer; 1000 java.lang.StringIndexOutOfBoundsException: Range [56, 55) out of bounds for length 72
ft_part2a ); ALTERTABLElt1 ATTACHALTER TABLE lt1 ATTACH PARTITION VALUESFROM (1000TO(2000) ALTER (a; -- ERROR DROPTABLE lt1; DROPFOREIGNTABLECREATETABLEft1 java.lang.StringIndexOutOfBoundsException: Range [39, 36) out of bounds for length 54
CREATETABLE lt1 (a INT) PARTITION BY ALTER FOREIGN TABLE ft1 ALTER COLUMN c8 TYPE char(10); CREATEINDEXON lt1 (a); TABLECREATE FOREIGN TABLE ajava.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 48
TITION lt1ATTACH VALUESFROM ()TO()java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75
PARTITION BY RANGE (); CREATEALTER ft1COLUMNc8 ( p2'2' p1)
PARTITIONOF FORVALUESFROM ()TO (100 SERVERs0;ALTERALTER SET 10000;
a )SERVERjava.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51 ALTERTABLE lt1_part1 ATTACH PARTITION ft_part_1_2 FORVALUESFROM (100) CREATETABLE ft_part1 UNIQUE () TABLE lt1ADDPRIMARYKEY(a) DROPFOREIGNTABLE ft_part_1_1 lt1 CREATEUNIQUEINDEXDROPTABLE lt1;
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 0
-- ALTER FOREIGN TABLE
COMMENT ONFOREIGNALTERFOREIGNTABLE java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 51
COMMENT ONFOREIGNTABLE ft1 ISUNIQUEINDEX lt1 a;
COMMENTONCOLUMN ft1.1IS EY)
COMMENTALTERFOREIGNTABLEDROP no_column -ERROR
ALTERFOREIGNTABLE ft1ALTERTABLE c9; ALTERFOREIGNTABLE ft1 ADDCOLUMN c5 integerDEFAULT0; ALTERFOREIGNTABLE ft1 ADDCOLUMN c6 serialjava.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46 ALTERFOREIGNTABLE ft1 ADDCOLUMNIFNOTALTERFOREIGN ft1 SET TABLESPACEts; ERROR
ADD c7 ; ALTERFOREIGNTABLE ft1 ADDCOLUMN c8 integer;
integer; ALTERFOREIGNTABLE ft1\df
-- alter noexisting tableTABLEIF doesnt_exist_ft1 integer;
ALTERFOREIGNTABLE ft1 ALTER FOREIGN TABLE IF EXISTS doesnt_exist_ft1IFCOLUMNNOTEXISTSc6;
EFAULT; ALTERCREATEUNIQUEON lt1 ();
LTERFOREIGNTABLEft1 DROP ; ALTERFOREIGNTABLE ft1 ALTERCOLUMN c8 TYPE char(10) USING'0'; -- ERROR ALTER PARTITIONOF IFADDc11;
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Range [6, 5) out of bounds for length 73 FOREIGNTABLECOLUMN OPTIONS(DD v1', ADD p2 'v2')java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75 ALTERCOLUMN c8ALTER ATTACH 10; ALTERDROP ; ALTERALTERTABLEIFEXISTSjava.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45 ALTERFOREIGNTABLE ft1 ALTERCOLUMN c1 SET (java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 0 ALTERTABLE c8STATISTICS1 ALTERFOREIGNADDintegerDEFAULT;
-- can't change the column type if it's used elsewhere CREATEFOREIGNADDIFIFEXISTS c11 TABLE ft1 ALTER FOREIGN TABLE ft1 ADD COLUMN c7 integerNOTNULL;
TABLE; ALTERFOREIGNTABLEIFEXISTS CHECKc9<)VALID ALTERFOREIGN java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Range [52, 5) out of bounds for length 53 ALTER java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 0
ALTERFOREIGNTABLE ft1 OWNER TO regress_test_role;
, SETquote', @)java.lang.StringIndexOutOfBoundsException: Index 80 out of bounds for length 80
no_column;-- ALTERFOREIGNTABLE ft1 DROP* java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 94
uORDER (),23 ; ALTERFOREIGNTABLE ft1 DROP c11; TABLEADDCOLUMNc11 ; ALTERSELECT*FROM information_schemaA FOREIGNTABLEft1 COLUMNc8 char10)USING'0 ALTERFOREIGNTABLE ft1 SET TABLESPACE ts;ALTERFOREIGN * FROM information_schema ORDER 1,2,34;
SEQUENCEft1_c11_seq SET uWHEREobject_type FOREIGN% ANDjava.lang.StringIndexOutOfBoundsException: Range [100, 99) out of bounds for length 140 ALTERFOREIGNTABLE foreign_schema.ft1 RENAME c1 TOALTERFOREIGNALTER c8 (ET V2,DROP ); ALTERFOREIGNTABLEALTER FOREIGN TABLE ft1 ALTERCOLUMN c1SETSTATISTICS 10000;;
d foreign_schemaforeign_table_1DROPMAPPINGjava.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 45
-- alter noexisting table ALTERALTERTABLECOLUMNSET -; ALTERFOREIGNTABLE ALTER FOREIGN TABLE ft c8 SETSTORAGEPLAIN; ALTER -- can't change the CREATE (''java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
java.lang.StringIndexOutOfBoundsException: Range [47, 46) out of bounds for length 69 SELECT',foo',U'; ALTERDROP ;
;
ALTERFOREIGNSELECToid =java.lang.StringIndexOutOfBoundsException: Range [57, 5) out of bounds for length 77
LTERTABLEIFNOTNULL
java.lang.StringIndexOutOfBoundsException: Range [42, 5) out of bounds for length 77 ALTERFOREIGNTABLEIFEXISTS doesnt_exist_ft1 ALTER (SELECT oid FROM pg_foreign_data_wrapper WHERE fdwname=);
java.lang.StringIndexOutOfBoundsException: Range [6, 5) out of bounds for length 98
OPTIONSDD, ''java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75 ALTERFOREIGNTABLEIFEXISTS doesnt_exist_ft1 ALTER'oo'USAGE;
FOREIGNALTERFOREIGNTABLEft1 ; FOREIGN ALTERFOREIGNTABLEIFSELECT has_server_privilege('regress_test_role',
java.lang.StringIndexOutOfBoundsException: Range [22, 19) out of bounds for length 103 ALTERFOREIGNTABLEIFEXISTS doesnt_exist_ft1 DROPCOLUMN no_column; FOREIGN ALTER FOREIGN TABLE IF
IF java.lang.StringIndexOutOfBoundsException: Range [47, 46) out of bounds for length 62
java.lang.StringIndexOutOfBoundsException: Range [46, 5) out of bounds for length 56 ALTER (
R IFEXISTS java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77 ALTERFOREIGNTABLE c11
-- Information schema
SELECTTABLESETSCHEMA; SELECTSELECT(s8, 'ALTER TABLE SET ts -- ERROR GRANTUSAGEONALTER SEQUENCE foreignft1_c11_seq ;
*ROMinformation_schema.java.lang.StringIndexOutOfBoundsException: Range [56, 55) out of bounds for length 73
ALTER FOREIGN TABLE foreign_scheRENAME; SELECT * FROMjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 FROM .usage_privileges object_typeLIKE'% AND '6 fooORDER1 , ; SELECT * FROM information_schema.role_usage_grants WHERE object_typeALTERDROP USER MAP public ; SELECT ALTER SERVER s6 OPTIONS hostDROPdbnamejava.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49 SELECT * FROM information_schema.foreign_table_options DATA ALTER FOREIGN DATA WRAPPER foo VALIDATOR postgresql_fdw_validator ; SET java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13 SELECTTABLE ;
uWHEREobject_type SELECT * FROM information_schema.usage_privileges WHERE object_type LIKE ALTER FOREIGN java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 63 DROP USER ALTER FOREIGN TABLE IFEXISTS doesnt_exist_ft1 ALTER GRANT USAGE ON FOREIGN DATA WRAPPER foo TO regress_test_role CREATE SERVER s9 FO foo ERROR SET ROLE regress_test_role2; SELECTDROP TABLE java.lang.StringIndexOutOfBoundsException: Range [47, 46) out of bounds for length 98
RESET ROLE;
-- has_foreign_data_wrapper_privilege SELECT(''
(SELECTCOLUMNOPTIONSADD''ADD v2;
has_foreign_data_wrapper_privilegeDROPUSERFORregress_test_role ;-- ERROR SELECT has_foreign_data_wrapper_privilege(
(SELECT oid FROM java.lang.StringIndexOutOfBoundsException: Range [0, 29) out of bounds for length 0
( pg_foreign_data_wrapper =) USAGE) SELECT has_foreign_data_wrapper_privilege(
(SELECT oid pg_foreign_data_wrapperWHERE=fooALTER java.lang.StringIndexOutOfBoundsException: Range [51, 46) out of bounds for length 76
java.lang.StringIndexOutOfBoundsException: Range [35, 6) out of bounds for length 42
( pg_roles rolnamer',foo FOREIGNIFdoesnt_exist_ft1Djava.lang.StringIndexOutOfBoundsException: Range [61, 60) out of bounds for length 103 SELECT ALTER FOREIGN TABLE IF java.lang.StringIndexOutOfBoundsException: Range [47, 46) out of bounds for length 69
USAGE java.lang.StringIndexOutOfBoundsException: Range [39, 35) out of bounds for length 61
java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 72
-- has_server_privilege SELECT has_server_privilege('regress_test_role', SELECT oid ='8),'IFEXISTS java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73 SELECT has_server_privilege('regress_test_role', 's8', s9postgresql;
java.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 28
(DROP SERVER;-- ERROR
(SELECTonschema
(
(SELECT oid *FROMFOREIGN s9TO;
(
* java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41 SELECTFROM java.lang.StringIndexOutOfBoundsException: Range [62, 61) out of bounds for length 73 SELECT*FROM SERVER;-- SELECT has_server_privilege('RESET ; REVOKEUSAGEREVOKE REVOKE USAGE ONWHERE LIKEFOREIGN% (s6, 'oo' java.lang.StringIndexOutOfBoundsException: Index 123 out of bounds for length 80
CREAT FOREIGNWRAPPER; java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
ROP s4 ALTER SERVER s6 OPTIONS (ALTER SERVER s6 OPTIONS (DROPregress_test_role FOR ALTERFOREIGN DATA WRAPPER foo VALIDATOR postgresql_fdw_validatorSET ;
-- Privileges
ROLE;
FOREIGN SELECT*. FOREIGNANDobject_nameIN ('','')ORDERBY1,,3,4 ; ALTERFOREIGN OPTIONS (otchatrue'; -- ERROR
WRAPPER fooSET java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28 DROPFOREIGN DATA WRAPPER fooALTER SERVERs9 '.'; -- ERROR GRANT-- has_foreign_data_wrapper_privilege CREATEFORjava.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 47
SERVER VERSION'.5'-- ERROR ALTER SERVER s4 OWNER -- Check visibility of user mapping SETROLE;
SERVERs4; GRANTUSAGE SERVER s4 ; - ERROR
REATECREATE java.lang.StringIndexOutOfBoundsException: Range [60, 56) out of bounds for length 85 ALTER USER MAPPING\eu+
(SELECT
RESET ROLE;
GRANT (oid- GRANTUSAGEONFOREIGNWRAPPERfooregress_unprivileged_role OPTION
OLE; SELECTjava.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 5
fooOPTIONS( java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48 DROPFOREIGN --
java.lang.StringIndexOutOfBoundsException: Range [11, 5) out of bounds for length 79 GRANTUSAGEFOREIGN WRAPPER foo TO ; CREATE SERVER s9 BEGIN ALTER SERVER RETURNNULL;
s6; GRANT$ languageplpgsql;
java.lang.StringIndexOutOfBoundsException: Range [22, 5) out of bounds for length 54
SERVER s6;
. EACH DROPSELECT(
RESET ROLE;
GRANTUSAGEONFOREIGN
SERVER ;
SERVERs9VERSION 1EACH GRANTUSAGE ALTER SERVER s6 OPTIONSs6(, )java.lang.StringIndexOutOfBoundsException: Range [50, 49) out of bounds for length 49 ALTER foojava.lang.StringIndexOutOfBoundsException: Range [41, 40) out of bounds for length 66 DROPforeign_schemaWRAPPERfoobar
RESET ROLE;
REATE java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 42 GRANTUSAGEONDROP DATA WRAPPER; SETe; ALTER SERVER s9 VERSION '1.2'; -- ERROR GRANTUSAGEONFOREIGN SERVER s9 TO regress_test_role; -- WARNING CREATE USER MAPPING FORcurrent_user SERVERCREATECONSTRAINTTRIGGERINSERTOROR DROP SERVER EXECUTE ();
-- Check visibility of user mapping data SET ;
s10FOREIGNDATA WRAPPERfoo; CREATE USERALTER USERALTER FOREIGN TABL.
java.lang.StringIndexOutOfBoundsException: Range [19, 6) out of bounds for length 85 -- owner of server can see some option fields
\deu
RESET ROLE; -- superuser can see all option fields
\deu+ -- unprivileged user cannot see any option field
ROLEregress_unprivileged_role
\deu+
; DROP SERVER DATAWRAPPER ;-- ERROR
-- Triggers
dummy_trigger) TRIGGER $
BEGIN NULL;DROPDATAWRAPPER; -- ERROR
java.lang.StringIndexOutOfBoundsException: Range [21, 3) out of bounds for length 21
java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
CREATE , ON . FOR)
TABLE ( java.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 45
CREATETRIGGER trigtest_after_stmt ALTER SERVER s6 VERSION '0.5'; ON foreign_schema.foreign_table_1+ft2 DROPFOREIGNTABLE ft2;
\d+
CREATETRIGGERtrigtest_after_stmt_tt AFTER INSERTORUPDATEORDELETE-- ERROR ON foreign_schema integerNOTNULL,
REFERENCING NEW FOR) ( ,, quote ',"be v)java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
;
TRIGGEROR ON.foreign_table_1\
EXECUTE PROCEDUREBLE ft3 (
CREATETRIGGER trigtest_after_row AFTER INSERTORUPDATEORDELETE
.foreign_table_1 FORCREATE MAPPINGFOR publicSERVERs9java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
EXECUTE PROCEDURE dummy_triggerdate
CREATESET-add
gn_table_1 FOREACH ROW
EXECUTE java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 51
EALTER SERVER s9 VERSION '1.1
trigtest_before_stmtjava.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
e_1
ENABLE TRIGGER trigtest_before_stmt;
DROPTRIGGER trigtest_before_stmt+ java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 42 DROPTRIGGER trigtest_before_row ON foreign_schema.\ft3 DROPTRIGGER trigtest_after_stmt ON foreign_schema.java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 49 TRIGGERtrigtest_after_row DROP TRIGGER trigtest_after_row ON
DROP FUNCTION dummy_trigger()CUSER ALTER TABLE fd_pt1 ALTER COLUMN c7 DROP ;
-- Table inheritance ALTERTABLE
c1 integerNOTNULL COLUMN SETjava.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 27
c2 text,
c3 date
);
)java.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 45
,,quote" be quoted"'java.lang.StringIndexOutOfBoundsException: Range [66, 65) out of bounds for length 68
d
\d+ ft2 DROPFOREIGNTABLE \eu+
\d+ fd_pt1-- superuser can see all option fields FOREIGNjava.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 5
java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
text
c3 date
) SERVER s0OPTIONS java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 24
\d-- Triggers
java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
\ NULLjava.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
ft2 CREATETABLE ct3() INHERITS(ft2);
java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 7
c1 integerNOTNULLEACHonstraints
c2 text,
c3CREATETRIGGER AFTER UPDATE
) -- connoinherit should be truefor NO INHERIT constraintONSELECTrelnameconname java.lang.StringIndexOutOfBoundsException: Range [45, 44) out of bounds for length 71
SERVER s0;
\d+ ft2
\java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
d+
-- add attributes recursively ALTERTABLE DROP FOREIGN TABLE ft2; NEWAS COLUMNc5 PROCEDUREdummy_trigger) ALTER CREATE TRIGGER trigtest_before_row BEFOREINSERTORUPDATEORDELETE ALTER ROW ALTER java.lang.StringIndexOutOfBoundsException: Range [34, 7) out of bounds for length 34
\d+ fd_pt1
\d+ ft2
\ON.
\d+ ft3
-- alter attributes recursively ALTER java.lang.StringIndexOutOfBoundsException: Range [23, 19) out of bounds for length 67 ALTERTABLEALTER ; ALTERTABLE fd_pt1 ALTERCOLUMN c6 SETNOTNULL; TABLEALTER c7DROP ; ALTERTABLE fd_pt1 ALTERCOLUMNFOREACH ROW ALTERchar10) ALTERTABLEALTER ALTER TABLE fd_pt1 DROPjava.lang.StringIndexOutOfBoundsException: Range [46, 45) out of bounds for length 54 ALTERDROPTRIGGERON .java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
TABLEALTERCOLUMN SETROP.; ALTERTABLE fd_pt1 ALTERDROPTRIGGERtrigtest_after_row foreign_schema. ALTERTABLE fd_pt1 ALTERCOLUMN java.lang.StringIndexOutOfBoundsException: Range [0, 1) out of bounds for length 0
\d+ fd_pt1
\d+ ft2
-- drop attributes recursively
java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8 ALTERTABLE fd_pt1 CREATE FOREIGN TABLE ft2ffd_pt1 java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42 ALTERTABLEDROPALTER java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 42
fd_pt1DROP ; ALTERTABLE fd_pt1 DROP+
\d+ fd_pt1
\d+ ft2
-- add constraints recursively ALTERTABLE fd_pt1 ADD c1 integer NO , ALTERTABLE fd_pt1 ADD c3date -- connoinherit should be true for NO INHERIT constraint SELECTIMPORT s1 java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39 ASjava.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 70 WHERE pc.CREATEFOREIGN java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26 ORDERBY1,java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 -- child does not inherit NO INHERIT constraints
\d+ fd_pt1
\d+ ft2
DROPFOREIGNTABLE ft2 java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0 CREATEFOREIGNTABLE ft2 (
c1 integerNOTNULL,
c2 text,
java.lang.StringIndexOutOfBoundsException: Range [8, 9) out of bounds for length 8 "''); -- child must have parent's INHERIT constraints ALTER ALTER TABLE fd_pt1 ADDCOLUMN c6 integer; ALTERFOREIGNTABLE ft2 ADDCONSTRAINT fd_pt1chk2 c >');
ft2 fd_pt1java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39 -- child does not inherit NO INHERIT constraints
\d+ fd_pt1
\d+java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
-- drop constraints recursively TABLEfd_pt1 java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 21 ALTERTABLE fd_pt1 DROPALTER fd_pt1 c3
-- NOT VALID case INTOfd_pt1 (, 'd_pt1't,'994---
BLE fd_pt1 CHECK c2<> ')NOT java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
\+fd_pt1
\d+ ft2 -- VALIDATE CONSTRAINT need do nothing on foreign tables
TABLE fd_pt1 java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
\d+ fd_pt1
\d+ ft2
-- changes name of an attribute recursively ALTERTABLE fd_pt1 RENAMECOLUMN c1 TO c3 , ALTERTABLE fd_pt1 RENAMECOLUMN c2 ) A TABLEfd_pt1 ALTERCOLUMN c1 (_distinct = 100java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58 DROPFOREIGN\ -- changes name of a constraint recursively TABLE (
\d+ c1 intege NOT ,
\d+ ft2
-- DROP FOREIGN TABLE
DROP FOREIGN TABLE no_table c2 ) DROPFOREIGNTABLEIFEXISTS no_table; DROP \
-- REASSIGN OWNED/DROP OWNED of foreign objects
java.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 58
ole2 DROP OWNEDd
-- Foreign partition DDL stuff
(
c1 integerNOT-- child must have parent's INHERIT constraints
c2,
c3 date
) PARTITION BYALTERfd_pt2 IN(1) CREATEFOREIGNTABLE fd_pt2_1 ALTERTABLEft2 ADDCHECK( <>'java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
\d+ fd_pt2
\-- child does not inherit NO INHERIT constraints
-- partition cannot have additional columns DROPFOREIGNALTERALTERTABLEfd_pt1DROPCONSTRAINT CREATEFOREIGNTABLE fd_pt2_1 (
c1 integerNOT-- NOT VALID case
c2text
c3 date,
)SERVER \+fd_pt1
\d+ fd_pt2_1 ALTERTABLE fd_pt2 -- foreign table cannot be part of partition ALTER TABLE fd_pt1 VALIDATE CONSTRAINT fd_pt1chk3
DROPFOREIGN-- changes name of an attribute recursively
CREATE ALTER TABLEfd_pt1 RENAMECOLUMN c2 TO f2;
c1 integerNOTNULL,
c2text,
c3 date
) SERVER s0 OPTIONS-- changes name of a constraint recursively
-- no attach partition validation occurs for foreign tables ALTERTABLE fd_pt2 \+ft2
\d+ fd_pt2
\d+ fd_pt2_1
-- cannot add column to a partition ALTERTABLE fd_pt2_1 ADD c4 charjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
-- ok to have a partition's own constraints though
LTER IMPORT FOREIGN s1 () s9 public ALTERTABLE IMPORTFOREIGNSCHEMAs1 t1 FROMs9 ;-
\+fd_pt2
\d+ fd_pt2_1
-- cannot drop inherited NOT NULL constraint from a partition ALTER DROP ;
-- partition must have parent's constraints ALTERDROP DROP FOREIGN TABLE foreign_schema;
fd_pt2 ALTER
\d+ fd_pt2
\d+ fd_pt2_1 ALTERTABLE fd_pt2 ATTACH PARTITION DROP FOREIGN DATA WRAPPER postgresql CASCADE; ALTER DROP FOREIGN ; ALTERTABLE fd_pt2 ATTACH PARTITION fd_pt2_1 java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 36
ALTERTABLE fd_pt2 DETACH ,fdwhandler,fdwvalidator,fdwoptionsFROMjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0 ALTERTABLENOT c1 integer NOT NULL;
\d+ fd_pt2
\d+ fd_pt2_1 ALTERTABLE fd_pt2 ATTACH) BYLIST (c1);
FOREIGN CONSTRAINT (c1>0); ALTERTABLE fd_pt2 ATTACH PARTITION fd_pt2_1 FORVALUESIN (1);
DROPFOREIGNTABLE fd_pt2_1;\ DROPTABLE java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 0
-- foreign table cannot be part of partition tree made of temporary -- relations. CREATE java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9 CREATEFOREIGNTABLE foreign_part PARTITION '' be ')java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
SERVERs0 CREATEFOREIGNTABLE foreign_part (ajava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 ALTERTABLECREATEFOREIGN ( DROPFOREIGNTABLE foreign_part;
c2text
-- Cleanup DROPSCHEMACASCADE; DROP ROLE regress_test_role; -- ERROR DROP java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12 DROP ALTER TAB fd_pt2ATTACH fd_pt2_1 VALUES () DROP DATA ; DROP SERVER s8 CASCADE; DROP\+ DROP ROLE regress_test_role; DROP ROLE regress_unprivileged_role TABLEADD c4 ;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 DROPALTER fd_pt2_1 c3 NULL; DROP ROLE regress_test_role2; DROPFOREIGN DATA WRAPPER postgresql CASCADE;
FOREIGNDATA WRAPPERdummy ;
\c DROP\+ fd_pt2
-- At this point we should have no wrappers, no servers, and no mappings.
-- cannot drop inherited NOTNULLconstraintfrom a partition SELECT srvname, srvoptions FROM pg_foreign_server; SELECT * FROM pg_user_mapping;
Messung V0.5 in Prozent
¤ Diese beiden folgenden Angebotsgruppen bietet das Unternehmen0.15Angebot
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.