@@ -2091,8 +2091,8 @@ class TConverter : public IPGParseEvents {
2091
2091
AddError (TStringBuilder () << " VariableSetStmt, set_config doesn't support that option:" << name);
2092
2092
return nullptr ;
2093
2093
}
2094
- if (rawStr != " pg_catalog" && rawStr != " public" ) {
2095
- AddError (TStringBuilder () << " VariableSetStmt, search path supports only public and pg_catalogue, but got : " << rawStr);
2094
+ if (rawStr != " pg_catalog" && rawStr != " public" && rawStr != " " && rawStr != " information_schema " ) {
2095
+ AddError (TStringBuilder () << " VariableSetStmt, search path supports only 'information_schema', ' public', 'pg_catalog', '' but got: ' " << rawStr << " ' " );
2096
2096
return nullptr ;
2097
2097
}
2098
2098
if (Settings.GUCSettings ) {
@@ -2382,12 +2382,16 @@ class TConverter : public IPGParseEvents {
2382
2382
case TRANS_STMT_COMMIT:
2383
2383
Statements.push_back (L (A (" let" ), A (" world" ), L (A (" CommitAll!" ),
2384
2384
A (" world" ))));
2385
- Settings.GUCSettings ->Commit ();
2385
+ if (Settings.GUCSettings ) {
2386
+ Settings.GUCSettings ->Commit ();
2387
+ }
2386
2388
return true ;
2387
2389
case TRANS_STMT_ROLLBACK:
2388
2390
Statements.push_back (L (A (" let" ), A (" world" ), L (A (" CommitAll!" ),
2389
2391
A (" world" ), QL (QL (QA (" mode" ), QA (" rollback" ))))));
2390
- Settings.GUCSettings ->RollBack ();
2392
+ if (Settings.GUCSettings ) {
2393
+ Settings.GUCSettings ->RollBack ();
2394
+ }
2391
2395
return true ;
2392
2396
default :
2393
2397
AddError (TStringBuilder () << " TransactionStmt: kind is not supported: " << (int )value->kind );
@@ -2526,7 +2530,7 @@ class TConverter : public IPGParseEvents {
2526
2530
}
2527
2531
if (schemaname == " " && Settings.GUCSettings ) {
2528
2532
auto search_path = Settings.GUCSettings ->Get (" search_path" );
2529
- if (!search_path || *search_path == " public" ) {
2533
+ if (!search_path || *search_path == " public" || search_path-> empty () ) {
2530
2534
return Settings.DefaultCluster ;
2531
2535
}
2532
2536
return TString (*search_path);
0 commit comments