pganalyze / libpg_query

C library for accessing the PostgreSQL parser outside of the server environment
BSD 3-Clause "New" or "Revised" License
1.21k stars 182 forks source link

Move deparser to dedicated file without pg_query dependencies #183

Closed lfittl closed 1 year ago

lfittl commented 1 year ago

This enables external projects that are interested to work with a raw parsetree to use the libpg_query deparser, without pulling in the main pg_query headers.

Fixes #180.

lfittl commented 1 year ago

Note that unfortunately git doesn't automatically detect this as a file move (since the old file still exists), but there are no changes in the deparser code, except for making deparseRawStmt exported, as is more easily seen by doing something like:

git diff 15-latest:src/pg_query_deparse.c src/postgres_deparse.c
keiko713 commented 1 year ago

Looks like you need to adopt changes you made with src/pg_query_deparse.c?

yrashk commented 1 year ago

Following up on this from #180 (sorry for the delay, been busy). Do you plan to update & merge this in?

yrashk commented 1 year ago

Bump?

yrashk commented 1 year ago

Anything I can do to help with this change? I can try and send new PR, rebased off the latest master.

lfittl commented 1 year ago

Anything I can do to help with this change? I can try and send new PR, rebased off the latest master.

Yes, that would actually help - this is on my list to get to, but if you make a new PR that is rebased it makes it an easy merge :)

yrashk commented 1 year ago

@lfittl I hope I captured the essence of the change correctly in #192

lfittl commented 1 year ago

Superseded by #192, which is now merged.