Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello 👋,
I'm attempting to expose the
pg_query_deparse_protobuf
function.I tried to follow the existing code, but I don't have any experience with C++ or NAPI so I'm stuck on the
DeparseQuerySync
function insync.cc
. 😅I understand that
pg_query_deparse_protobuf
is expecting the structPgQueryProtobuf
as its 1st argument, but I'm not sure how to declare and pass it.Right now it generates this error:
Any help is appreciated. 🙏
EDIT:
In fact, it seems like
pg_query_deparse_protobuf
will only be able to accept the result ofpg_query_parse_protobuf
, so it won't work on the result ofpg_query_parse
if I understand correctly. 🤔We would need to add a
pg_query_deparse
to libpg_query which would accept the result ofpg_query_parse
and skip the protobuf layer. I opened an issue about it: pganalyze/libpg_query#178.I would love to have your feedback @pyramation on this matter, I saw you opened an issue about deparsing in libpg_query and you were interested in bringing it into this lib. 😄