Giter VIP home page Giter VIP logo

Comments (9)

lelit avatar lelit commented on June 12, 2024

from pglast.

lelit avatar lelit commented on June 12, 2024

But wait, are you sure you are using the v2 branch?

This is what I get with that:

$ pgpp 
WITH k AS MATERIALIZED (select * from m) select * from k
WITH k AS (SELECT *
           FROM m)

  SELECT *
  FROM k
/home/lele/wip/pglast/pglast/__init__.py:61: RuntimeWarning: Detected a non-cosmetic difference between original and prettified statements, please report
  warnings.warn("Detected a non-cosmetic difference between original and"
WITH k AS MATERIALIZED (select * from m) select * from k

from pglast.

ak409 avatar ak409 commented on June 12, 2024

Possibly it was my bad, I did not switch pg_query to needed commit..

Maybe next question is not part of this issue, but maybe you faced it:

After pglast v2 was succesfully installed, I have such traceback during importing pglast or using pgpp:

pgpp --help
Traceback (most recent call last):
  File "/usr/local/bin/pgpp", line 5, in <module>
    from pglast.__main__ import main
  File "/usr/local/lib/python3.7/site-packages/pglast/__init__.py", line 12, in <module>
    from .parser import get_postgresql_version, parse_plpgsql, parse_sql
ImportError: /usr/local/lib/python3.7/site-packages/pglast/parser.cpython-37m-x86_64-linux-gnu.so: undefined symbol: get_array_type

I use official python3 docker image. The same behaviour is for python:3.8.3-buster, python:3.7.8-stretch. But master branch works correctly.

from pglast.

lelit avatar lelit commented on June 12, 2024

Does the image contain bison and flex? See commit 538890f, that cured a similar problem in the CI machinery.

from pglast.

ak409 avatar ak409 commented on June 12, 2024

Cool) Thanks a lot) you are awesome)

from pglast.

lelit avatar lelit commented on June 12, 2024

Why did you close this? It's not solved yet, please let me do that when I have a solution 😄

from pglast.

ak409 avatar ak409 commented on June 12, 2024

I closed because everything you told me make it work.

Ok, I will not close it)
So from our side we are starting to test our 1k+ analytical scripts with v2. So If you need to test something on bunch of scripts, we are ready and glad to help) Just message me or Paul

from pglast.

lelit avatar lelit commented on June 12, 2024

Yes, I'm not surprised that the parser works, but pglast is still not able to print the AST back.
Thanks for the help offer! FYI, I usually hangs on #pglast on freenode.

from pglast.

lelit avatar lelit commented on June 12, 2024

Ok, this should be fixed in the v2 branch!

I'll gladly try to fix any further issue you may find with your substantial scripts collection 😄

from pglast.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.