pg_sql_dummy.cpp 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569
  1. #include <yql/essentials/parser/pg_wrapper/interface/interface.h>
  2. #include <yql/essentials/minikql/computation/mkql_computation_node_pack_impl.h>
  3. #include <yql/essentials/minikql/mkql_buffer.h>
  4. #include <yql/essentials/sql/settings/translator.h>
  5. namespace NSQLTranslationPG {
  6. NYql::TAstParseResult PGToYql(const TString& query, const NSQLTranslation::TTranslationSettings& settings, NYql::TStmtParseInfo* stmtParseInfo) {
  7. Y_UNUSED(query);
  8. Y_UNUSED(settings);
  9. Y_UNUSED(stmtParseInfo);
  10. NYql::TAstParseResult result;
  11. result.Issues.AddIssue(NYql::TIssue("PostgreSQL parser is not available"));
  12. return result;
  13. }
  14. TVector<NYql::TAstParseResult> PGToYqlStatements(const TString& query, const NSQLTranslation::TTranslationSettings& settings, TVector<NYql::TStmtParseInfo>* stmtParseInfo) {
  15. Y_UNUSED(query);
  16. Y_UNUSED(settings);
  17. Y_UNUSED(stmtParseInfo);
  18. return {};
  19. }
  20. std::unique_ptr<NYql::NPg::IExtensionSqlParser> CreateExtensionSqlParser() {
  21. throw yexception() << "CreateExtensionSqlParser: PG types are not supported";
  22. }
  23. std::unique_ptr<NYql::NPg::ISystemFunctionsParser> CreateSystemFunctionsParser() {
  24. throw yexception() << "CreateSystemFunctionsParser: PG types are not supported";
  25. }
  26. std::unique_ptr<NYql::NPg::ISqlLanguageParser> CreateSqlLanguageParser() {
  27. throw yexception() << "CreateSqlLanguageParser: PG types are not supported";
  28. }
  29. NSQLTranslation::TTranslatorPtr MakeTranslator() {
  30. return NSQLTranslation::MakeDummyTranslator("pg");
  31. }
  32. } // NSQLTranslationPG
  33. namespace NYql {
  34. namespace NCommon {
  35. TString PgValueToString(const NUdf::TUnboxedValuePod& value, ui32 pgTypeId) {
  36. Y_UNUSED(value);
  37. Y_UNUSED(pgTypeId);
  38. throw yexception() << "PgValueToString: PG types are not supported";
  39. }
  40. NUdf::TUnboxedValue PgValueFromString(const TStringBuf text, ui32 pgTypeId) {
  41. Y_UNUSED(text);
  42. Y_UNUSED(pgTypeId);
  43. throw yexception() << "PgValueFromString: PG types are not supported";
  44. }
  45. TString PgValueToNativeText(const NUdf::TUnboxedValuePod& value, ui32 pgTypeId) {
  46. Y_UNUSED(value);
  47. Y_UNUSED(pgTypeId);
  48. throw yexception() << "PgValueToNativeText: PG types are not supported";
  49. }
  50. NUdf::TUnboxedValue PgValueFromNativeText(const TStringBuf text, ui32 pgTypeId) {
  51. Y_UNUSED(text);
  52. Y_UNUSED(pgTypeId);
  53. throw yexception() << "PgValueFromNativeText: PG types are not supported";
  54. }
  55. TString PgValueToNativeBinary(const NUdf::TUnboxedValuePod& value, ui32 pgTypeId) {
  56. Y_UNUSED(value);
  57. Y_UNUSED(pgTypeId);
  58. throw yexception() << "PgValueToNativeBinary: PG types are not supported";
  59. }
  60. NUdf::TUnboxedValue PgValueFromNativeBinary(const TStringBuf binary, ui32 pgTypeId) {
  61. Y_UNUSED(binary);
  62. Y_UNUSED(pgTypeId);
  63. throw yexception() << "PgValueFromNativeBinary: PG types are not supported";
  64. }
  65. TString PgValueCoerce(const NUdf::TUnboxedValuePod& value, ui32 pgTypeId, i32 typMod, TMaybe<TString>* error) {
  66. Y_UNUSED(value);
  67. Y_UNUSED(pgTypeId);
  68. Y_UNUSED(typMod);
  69. Y_UNUSED(error);
  70. throw yexception() << "PgValueCoerce: PG types are not supported";
  71. }
  72. void WriteYsonValuePg(NResult::TYsonResultWriter& writer, const NUdf::TUnboxedValuePod& value, NKikimr::NMiniKQL::TPgType* type,
  73. const TVector<ui32>* structPositions) {
  74. Y_UNUSED(writer);
  75. Y_UNUSED(value);
  76. Y_UNUSED(type);
  77. Y_UNUSED(structPositions);
  78. throw yexception() << "WriteYsonValuePg: PG types are not supported";
  79. }
  80. void WriteYsonValueInTableFormatPg(TOutputBuf& buf, NKikimr::NMiniKQL::TPgType* type, const NKikimr::NUdf::TUnboxedValuePod& value, bool topLevel) {
  81. Y_UNUSED(buf);
  82. Y_UNUSED(type);
  83. Y_UNUSED(value);
  84. Y_UNUSED(topLevel);
  85. throw yexception() << "WriteYsonValueInTableFormatPg: PG types are not supported";
  86. }
  87. NUdf::TUnboxedValue ReadYsonValueInTableFormatPg(NKikimr::NMiniKQL::TPgType* type, char cmd, TInputBuf& buf) {
  88. Y_UNUSED(type);
  89. Y_UNUSED(cmd);
  90. Y_UNUSED(buf);
  91. throw yexception() << "ReadYsonValueInTableFormatPg: PG types are not supported";
  92. }
  93. NUdf::TUnboxedValue ReadYsonValuePg(NKikimr::NMiniKQL::TPgType* type, char cmd, TInputBuf& buf) {
  94. Y_UNUSED(type);
  95. Y_UNUSED(cmd);
  96. Y_UNUSED(buf);
  97. throw yexception() << "ReadYsonValuePg: PG types are not supported";
  98. }
  99. void SkipSkiffPg(NKikimr::NMiniKQL::TPgType* type, NCommon::TInputBuf& buf) {
  100. Y_UNUSED(type);
  101. Y_UNUSED(buf);
  102. throw yexception() << "SkipSkiffPg: PG types are not supported";
  103. }
  104. NKikimr::NUdf::TUnboxedValue ReadSkiffPg(NKikimr::NMiniKQL::TPgType* type, NCommon::TInputBuf& buf) {
  105. Y_UNUSED(type);
  106. Y_UNUSED(buf);
  107. throw yexception() << "ReadSkiffPg: PG types are not supported";
  108. }
  109. void WriteSkiffPg(NKikimr::NMiniKQL::TPgType* type, const NKikimr::NUdf::TUnboxedValuePod& value, NCommon::TOutputBuf& buf) {
  110. Y_UNUSED(type);
  111. Y_UNUSED(value);
  112. Y_UNUSED(buf);
  113. throw yexception() << "WriteSkiffPg: PG types are not supported";
  114. }
  115. extern "C" void ReadSkiffPgValue(NKikimr::NMiniKQL::TPgType* type, NKikimr::NUdf::TUnboxedValue& value, NCommon::TInputBuf& buf) {
  116. Y_UNUSED(type);
  117. Y_UNUSED(value);
  118. Y_UNUSED(buf);
  119. throw yexception() << "ReadSkiffPgValue: PG types are not supported";
  120. }
  121. extern "C" void WriteSkiffPgValue(NKikimr::NMiniKQL::TPgType* type, const NKikimr::NUdf::TUnboxedValuePod& value, NCommon::TOutputBuf& buf) {
  122. Y_UNUSED(type);
  123. Y_UNUSED(value);
  124. Y_UNUSED(buf);
  125. throw yexception() << "WriteSkiffPgValue: PG types are not supported";
  126. }
  127. } // namespace NCommon
  128. } // NYql
  129. namespace NKikimr {
  130. namespace NMiniKQL {
  131. void* PgInitializeMainContext() {
  132. return nullptr;
  133. }
  134. void PgDestroyMainContext(void* ctx) {
  135. Y_UNUSED(ctx);
  136. }
  137. void PgAcquireThreadContext(void* ctx) {
  138. Y_UNUSED(ctx);
  139. }
  140. void PgReleaseThreadContext(void* ctx) {
  141. Y_UNUSED(ctx);
  142. }
  143. void PgSetGUCSettings(void* ctx, const TGUCSettings::TPtr& GUCSettings) {
  144. Y_UNUSED(ctx);
  145. Y_UNUSED(GUCSettings);
  146. }
  147. std::unique_ptr<NYql::NPg::IExtensionLoader> CreateExtensionLoader() {
  148. throw yexception() << "PG types are not supported";
  149. }
  150. std::optional<std::string> PGGetGUCSetting(const std::string& key) {
  151. Y_UNUSED(key);
  152. throw yexception() << "PG types are not supported";
  153. }
  154. ui64 PgValueSize(const NUdf::TUnboxedValuePod& value, i32 typeLen) {
  155. Y_UNUSED(typeLen);
  156. Y_UNUSED(value);
  157. throw yexception() << "PG types are not supported";
  158. }
  159. ui64 PgValueSize(ui32 type, const NUdf::TUnboxedValuePod& value) {
  160. Y_UNUSED(type);
  161. Y_UNUSED(value);
  162. throw yexception() << "PG types are not supported";
  163. }
  164. ui64 PgValueSize(const TPgType* type, const NUdf::TUnboxedValuePod& value) {
  165. Y_UNUSED(type);
  166. Y_UNUSED(value);
  167. throw yexception() << "PG types are not supported";
  168. }
  169. void PGPackImpl(bool stable, const TPgType* type, const NUdf::TUnboxedValuePod& value, TBuffer& buf) {
  170. Y_UNUSED(stable);
  171. Y_UNUSED(type);
  172. Y_UNUSED(value);
  173. Y_UNUSED(buf);
  174. throw yexception() << "PG types are not supported";
  175. }
  176. void PGPackImpl(bool stable, const TPgType* type, const NUdf::TUnboxedValuePod& value, NKikimr::NMiniKQL::TPagedBuffer& buf) {
  177. Y_UNUSED(stable);
  178. Y_UNUSED(type);
  179. Y_UNUSED(value);
  180. Y_UNUSED(buf);
  181. throw yexception() << "PG types are not supported";
  182. }
  183. NUdf::TUnboxedValue PGUnpackImpl(const TPgType* type, TStringBuf& buf) {
  184. Y_UNUSED(type);
  185. Y_UNUSED(buf);
  186. throw yexception() << "PG types are not supported";
  187. }
  188. NUdf::TUnboxedValue PGUnpackImpl(const TPgType* type, NDetails::TChunkedInputBuffer& buf) {
  189. Y_UNUSED(type);
  190. Y_UNUSED(buf);
  191. throw yexception() << "PG types are not supported";
  192. }
  193. void EncodePresortPGValue(TPgType* type, const NUdf::TUnboxedValue& value, TVector<ui8>& output) {
  194. Y_UNUSED(type);
  195. Y_UNUSED(value);
  196. Y_UNUSED(output);
  197. throw yexception() << "PG types are not supported";
  198. }
  199. NUdf::TUnboxedValue DecodePresortPGValue(TPgType* type, TStringBuf& input, TVector<ui8>& buffer) {
  200. Y_UNUSED(type);
  201. Y_UNUSED(input);
  202. Y_UNUSED(buffer);
  203. throw yexception() << "PG types are not supported";
  204. }
  205. void* PgInitializeContext(const std::string_view& contextType) {
  206. Y_UNUSED(contextType);
  207. return nullptr;
  208. }
  209. void PgDestroyContext(const std::string_view& contextType, void* ctx) {
  210. Y_UNUSED(contextType);
  211. Y_UNUSED(ctx);
  212. }
  213. NUdf::IHash::TPtr MakePgHash(const NMiniKQL::TPgType* type) {
  214. Y_UNUSED(type);
  215. throw yexception() << "PG types are not supported";
  216. }
  217. NUdf::ICompare::TPtr MakePgCompare(const NMiniKQL::TPgType* type) {
  218. Y_UNUSED(type);
  219. throw yexception() << "PG types are not supported";
  220. }
  221. NUdf::IEquate::TPtr MakePgEquate(const NMiniKQL::TPgType* type) {
  222. Y_UNUSED(type);
  223. throw yexception() << "PG types are not supported";
  224. }
  225. NUdf::IBlockItemComparator::TPtr MakePgItemComparator(ui32 typeId) {
  226. Y_UNUSED(typeId);
  227. throw yexception() << "PG types are not supported";
  228. }
  229. NUdf::IBlockItemHasher::TPtr MakePgItemHasher(ui32 typeId) {
  230. Y_UNUSED(typeId);
  231. throw yexception() << "PG types are not supported";
  232. }
  233. void RegisterPgBlockAggs(THashMap<TString, std::unique_ptr<IBlockAggregatorFactory>>& registry) {
  234. Y_UNUSED(registry);
  235. }
  236. } // namespace NMiniKQL
  237. } // namespace NKikimr
  238. namespace NYql {
  239. arrow::Datum MakePgScalar(NKikimr::NMiniKQL::TPgType* type, const NKikimr::NUdf::TUnboxedValuePod& value, arrow::MemoryPool& pool) {
  240. Y_UNUSED(type);
  241. Y_UNUSED(value);
  242. Y_UNUSED(pool);
  243. return arrow::Datum();
  244. }
  245. arrow::Datum MakePgScalar(NKikimr::NMiniKQL::TPgType* type, const NUdf::TBlockItem& value, arrow::MemoryPool& pool) {
  246. Y_UNUSED(type);
  247. Y_UNUSED(value);
  248. Y_UNUSED(pool);
  249. return arrow::Datum();
  250. }
  251. TColumnConverter BuildPgColumnConverter(const std::shared_ptr<arrow::DataType>& originalType, NKikimr::NMiniKQL::TPgType* targetType) {
  252. Y_UNUSED(originalType);
  253. Y_UNUSED(targetType);
  254. return {};
  255. }
  256. ui32 ConvertToPgType(NKikimr::NUdf::EDataSlot slot) {
  257. Y_UNUSED(slot);
  258. throw yexception() << "PG types are not supported";
  259. }
  260. TMaybe<NKikimr::NUdf::EDataSlot> ConvertFromPgType(ui32 typeId) {
  261. Y_UNUSED(typeId);
  262. return Nothing();
  263. }
  264. bool ParsePgIntervalModifier(const TString& str, i32& ret) {
  265. Y_UNUSED(str);
  266. Y_UNUSED(ret);
  267. return false;
  268. }
  269. class TPgDummyBuilder : public NUdf::IPgBuilder {
  270. public:
  271. NUdf::TUnboxedValue ValueFromText(ui32 typeId, const NUdf::TStringRef& value, NUdf::TStringValue& error) const override {
  272. Y_UNUSED(typeId);
  273. Y_UNUSED(value);
  274. error = NUdf::TStringValue(TStringBuf("TPgDummyBuilder::ValueFromText does nothing"));
  275. return NUdf::TUnboxedValue();
  276. }
  277. NUdf::TUnboxedValue ValueFromBinary(ui32 typeId, const NUdf::TStringRef& value, NUdf::TStringValue& error) const override {
  278. Y_UNUSED(typeId);
  279. Y_UNUSED(value);
  280. error = NUdf::TStringValue(TStringBuf("TPgDummyBuilder::ValueFromBinary does nothing"));
  281. return NUdf::TUnboxedValue();
  282. }
  283. NUdf::TUnboxedValue ConvertFromPg(NUdf::TUnboxedValue source, ui32 sourceTypeId, const NUdf::TType* targetType) const override {
  284. Y_UNUSED(source);
  285. Y_UNUSED(sourceTypeId);
  286. Y_UNUSED(targetType);
  287. ythrow yexception() << "TPgDummyBuilder::ConvertFromPg does nothing";
  288. }
  289. NUdf::TUnboxedValue ConvertToPg(NUdf::TUnboxedValue source, const NUdf::TType* sourceType, ui32 targetTypeId) const override {
  290. Y_UNUSED(source);
  291. Y_UNUSED(sourceType);
  292. Y_UNUSED(targetTypeId);
  293. ythrow yexception() << "TPgDummyBuilder::ConvertToPg does nothing";
  294. }
  295. NUdf::TUnboxedValue NewString(i32 typeLen, ui32 targetTypeId, NUdf::TStringRef data) const override {
  296. Y_UNUSED(typeLen);
  297. Y_UNUSED(targetTypeId);
  298. Y_UNUSED(data);
  299. ythrow yexception() << "TPgDummyBuilder::NewString does nothing";
  300. }
  301. NUdf::TStringRef AsCStringBuffer(const NUdf::TUnboxedValue& value) const override {
  302. Y_UNUSED(value);
  303. ythrow yexception() << "TPgDummyBuilder::AsCStringBuffer does nothing";
  304. }
  305. NUdf::TStringRef AsTextBuffer(const NUdf::TUnboxedValue& value) const override {
  306. Y_UNUSED(value);
  307. ythrow yexception() << "TPgDummyBuilder::AsTextBuffer does nothing";
  308. }
  309. NUdf::TUnboxedValue MakeCString(const char* value) const override {
  310. Y_UNUSED(value);
  311. ythrow yexception() << "TPgDummyBuilder::MakeCString does nothing";
  312. }
  313. NUdf::TUnboxedValue MakeText(const char* value) const override {
  314. Y_UNUSED(value);
  315. ythrow yexception() << "TPgDummyBuilder::MakeText does nothing";
  316. }
  317. NUdf::TStringRef AsFixedStringBuffer(const NUdf::TUnboxedValue& value, ui32 length) const override {
  318. Y_UNUSED(value);
  319. Y_UNUSED(length);
  320. ythrow yexception() << "TPgDummyBuilder::AsFixedStringBuffer does nothing";
  321. }
  322. };
  323. std::unique_ptr<NUdf::IPgBuilder> CreatePgBuilder() {
  324. return std::make_unique<TPgDummyBuilder>();
  325. }
  326. bool HasPgKernel(ui32 procOid) {
  327. Y_UNUSED(procOid);
  328. return false;
  329. }
  330. std::function<NKikimr::NMiniKQL::IComputationNode* (NKikimr::NMiniKQL::TCallable&,
  331. const NKikimr::NMiniKQL::TComputationNodeFactoryContext&)> GetPgFactory()
  332. {
  333. return [] (
  334. NKikimr::NMiniKQL::TCallable& callable,
  335. const NKikimr::NMiniKQL::TComputationNodeFactoryContext& ctx
  336. ) -> NKikimr::NMiniKQL::IComputationNode* {
  337. Y_UNUSED(callable);
  338. Y_UNUSED(ctx);
  339. return nullptr;
  340. };
  341. }
  342. IOptimizer* MakePgOptimizerInternal(const IOptimizer::TInput& input, const std::function<void(const TString&)>& log)
  343. {
  344. Y_UNUSED(input);
  345. Y_UNUSED(log);
  346. ythrow yexception() << "PgJoinSearch does nothing";
  347. }
  348. IOptimizerNew* MakePgOptimizerNew(IProviderContext& pctx, TExprContext& ctx, const std::function<void(const TString&)>& log)
  349. {
  350. Y_UNUSED(pctx);
  351. Y_UNUSED(ctx);
  352. Y_UNUSED(log);
  353. ythrow yexception() << "PgJoinSearch does nothing";
  354. }
  355. } // NYql
  356. namespace NKikimr::NPg {
  357. ui32 PgTypeIdFromTypeDesc(const ITypeDesc* typeDesc) {
  358. Y_UNUSED(typeDesc);
  359. return 0;
  360. }
  361. const ITypeDesc* TypeDescFromPgTypeId(ui32 pgTypeId) {
  362. Y_UNUSED(pgTypeId);
  363. return {};
  364. }
  365. TString PgTypeNameFromTypeDesc(const ITypeDesc* typeDesc, const TString& typeMod) {
  366. Y_UNUSED(typeDesc);
  367. Y_UNUSED(typeMod);
  368. return "";
  369. }
  370. const ITypeDesc* TypeDescFromPgTypeName(const TStringBuf name) {
  371. Y_UNUSED(name);
  372. return {};
  373. }
  374. TString TypeModFromPgTypeName(const TStringBuf name) {
  375. Y_UNUSED(name);
  376. return {};
  377. }
  378. bool TypeDescIsComparable(const ITypeDesc* typeDesc) {
  379. Y_UNUSED(typeDesc);
  380. throw yexception() << "PG types are not supported";
  381. }
  382. i32 TypeDescGetTypeLen(const ITypeDesc* typeDesc) {
  383. Y_UNUSED(typeDesc);
  384. throw yexception() << "PG types are not supported";
  385. }
  386. ui32 TypeDescGetStoredSize(const ITypeDesc* typeDesc) {
  387. Y_UNUSED(typeDesc);
  388. throw yexception() << "PG types are not supported";
  389. }
  390. bool TypeDescNeedsCoercion(const ITypeDesc* typeDesc) {
  391. Y_UNUSED(typeDesc);
  392. throw yexception() << "PG types are not supported";
  393. }
  394. int PgNativeBinaryCompare(const char* dataL, size_t sizeL, const char* dataR, size_t sizeR, const ITypeDesc* typeDesc) {
  395. Y_UNUSED(dataL);
  396. Y_UNUSED(sizeL);
  397. Y_UNUSED(dataR);
  398. Y_UNUSED(sizeR);
  399. Y_UNUSED(typeDesc);
  400. throw yexception() << "PG types are not supported";
  401. }
  402. ui64 PgNativeBinaryHash(const char* data, size_t size, const ITypeDesc* typeDesc) {
  403. Y_UNUSED(data);
  404. Y_UNUSED(size);
  405. Y_UNUSED(typeDesc);
  406. throw yexception() << "PG types are not supported";
  407. }
  408. TTypeModResult BinaryTypeModFromTextTypeMod(const TString& str, const ITypeDesc* typeDesc) {
  409. Y_UNUSED(str);
  410. Y_UNUSED(typeDesc);
  411. throw yexception() << "PG types are not supported";
  412. }
  413. TMaybe<TString> PgNativeBinaryValidate(const TStringBuf binary, const ITypeDesc* typeDesc) {
  414. Y_UNUSED(binary);
  415. Y_UNUSED(typeDesc);
  416. throw yexception() << "PG types are not supported";
  417. }
  418. TCoerceResult PgNativeBinaryCoerce(const TStringBuf binary, const ITypeDesc* typeDesc, i32 typmod) {
  419. Y_UNUSED(binary);
  420. Y_UNUSED(typeDesc);
  421. Y_UNUSED(typmod);
  422. throw yexception() << "PG types are not supported";
  423. }
  424. TConvertResult PgNativeBinaryFromNativeText(const TString& str, const ITypeDesc* typeDesc) {
  425. Y_UNUSED(str);
  426. Y_UNUSED(typeDesc);
  427. throw yexception() << "PG types are not supported";
  428. }
  429. TConvertResult PgNativeBinaryFromNativeText(const TString& str, ui32 pgTypeId) {
  430. Y_UNUSED(str);
  431. Y_UNUSED(pgTypeId);
  432. throw yexception() << "PG types are not supported";
  433. }
  434. TConvertResult PgNativeTextFromNativeBinary(const TStringBuf binary, const ITypeDesc* typeDesc) {
  435. Y_UNUSED(binary);
  436. Y_UNUSED(typeDesc);
  437. throw yexception() << "PG types are not supported";
  438. }
  439. TConvertResult PgNativeTextFromNativeBinary(const TStringBuf binary, ui32 pgTypeId) {
  440. Y_UNUSED(binary);
  441. Y_UNUSED(pgTypeId);
  442. throw yexception() << "PG types are not supported";
  443. }
  444. TString GetPostgresServerVersionNum() {
  445. return "-1";
  446. }
  447. TString GetPostgresServerVersionStr() {
  448. return "pg_sql_dummy";
  449. }
  450. } // namespace NKikimr::NPg
  451. namespace NYql {
  452. ui64 HexEncode(const char *src, size_t len, char *dst) {
  453. Y_UNUSED(src);
  454. Y_UNUSED(len);
  455. Y_UNUSED(dst);
  456. throw yexception() << "HexEncode in pg_dummy does nothing";
  457. }
  458. std::unique_ptr<IYtColumnConverter> BuildPgTopLevelColumnReader(std::unique_ptr<NKikimr::NUdf::IArrayBuilder>&& /* builder */, const NKikimr::NMiniKQL::TPgType* /* targetType */) {
  459. throw yexception() << "PG types are not supported";
  460. }
  461. std::unique_ptr<IYsonComplexTypeReader> BuildPgYsonColumnReader(const NUdf::TPgTypeDescription& /* desc */) {
  462. throw yexception() << "PG types are not supported";
  463. }
  464. } // NYql