Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PG 16 upgrade #107

Open
pyramation opened this issue Mar 29, 2024 · 5 comments
Open

PG 16 upgrade #107

pyramation opened this issue Mar 29, 2024 · 5 comments

Comments

@pyramation
Copy link
Collaborator

pyramation commented Mar 29, 2024

we finally got PG 16 (& windows) working on libpg-query thanks to @aquariuslt 🙏🏻

Now would be great to get this library upgraded. I'm pretty sure only a few ASTs changed. Will use this issue to document those changes:

Strings seem to be the only issue, and I believe their in A_Const and a few others:

                    "A_Const": Object {
                          "location": 1323,
-                     "val": Object {
-                       "String": Object {
-                         "str": "",
-                       },
+                     "sval": Object {
+                       "sval": "",
                "ColumnRef": Object {
                      "fields": Array [
                        Object {
                          "String": Object {
-                           "str": "c",
+                           "sval": "c",
                          },
                        },
@pyramation
Copy link
Collaborator Author

pyramation commented Mar 29, 2024

found a few more

                "typmods": Array [
                    Object {
                      "A_Const": Object {
-                       "location": 50,
-                       "val": Object {
-                         "Integer": Object {
+                       "ival": Object {
                          "ival": 2,
-                         },
                        },
+                       "location": 50,
                      },
                    },
                  ],

@pyramation
Copy link
Collaborator Author

from launchql/libpg-query-node#21 via @nith2001 :

Hello @pyramation, thank you for the work you've been doing in libpg-query-node. I'm a developer from the Supabase codebase and we've been facing issues parsing Postgres queries past V13. We were able to trace the issue here since we use pgsql-parser, which uses this library as a sub-dependency.

We noticed that you have the V15 PR ready here, and we wanted to ask if it would be possible to merge this in, assuming it's ready. If not, could we get a timeline on how long before it can be merged?

@beeing
Copy link

beeing commented Jun 25, 2024

This should be released as a major version 😄, perhaps the major version can be tied to PG's version as well.

@pyramation
Copy link
Collaborator Author

I think we'll upgrade to PG 15 first, and use 15-latest similar to libpg-query

we're testing out deparse on 15 now

@pashaie
Copy link

pashaie commented Dec 13, 2024

thanks for your hard work.
any update?
we need windows support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants