Skip to content

Commit 06f9376

Browse files
authored
Add PG provider to pgrun (#732)
1 parent 0398864 commit 06f9376

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

ydb/library/yql/tools/pgrun/pgrun.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#include <ydb/library/yql/providers/common/provider/yql_provider_names.h>
1010
#include <ydb/library/yql/providers/common/proto/gateways_config.pb.h>
1111
#include <ydb/library/yql/providers/yt/provider/yql_yt_provider.h>
12+
#include <ydb/library/yql/providers/pg/provider/yql_pg_provider.h>
1213
#include <ydb/library/yql/public/issue/yql_issue.h>
1314

1415
#include <library/cpp/getopt/last_getopt.h>
@@ -971,6 +972,7 @@ int Main(int argc, char* argv[])
971972

972973
static const TString DefaultCluster{"plato"};
973974
clusterMapping[DefaultCluster] = YtProviderName;
975+
clusterMapping["pg_catalog"] = PgProviderName;
974976

975977
opts.AddHelpOption();
976978
opts.AddLongOption("datadir", "directory for tables").StoreResult<TString>(&rawDataDir);
@@ -1001,6 +1003,7 @@ int Main(int argc, char* argv[])
10011003

10021004
TVector<TDataProviderInitializer> dataProvidersInit;
10031005
dataProvidersInit.push_back(GetYtNativeDataProviderInitializer(ytNativeGateway));
1006+
dataProvidersInit.push_back(GetPgDataProviderInitializer());
10041007

10051008
TExprContext ctx;
10061009
TExprContext::TFreezeGuard freezeGuard(ctx);

ydb/library/yql/tools/pgrun/ya.make

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ PEERDIR(
3232
ydb/library/yql/providers/yt/gateway/file
3333
ydb/library/yql/providers/yt/comp_nodes/llvm
3434
ydb/library/yql/providers/yt/codec/codegen
35+
ydb/library/yql/providers/pg/provider
3536
ydb/library/yql/core/url_preprocessing
3637
ydb/library/yql/parser/pg_wrapper
3738
)

0 commit comments

Comments
 (0)