Comments (9)
from pglast.
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.
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.
Does the image contain bison
and flex
? See commit 538890f, that cured a similar problem in the CI machinery.
from pglast.
Cool) Thanks a lot) you are awesome)
from pglast.
Why did you close this? It's not solved yet, please let me do that when I have a solution 😄
from pglast.
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.
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.
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)
- Extra parens when formatting different operations HOT 2
- Support PG 15 HOT 5
- deparse_protobuf() broken on big-endian HOT 9
- Deparsing of modified queries and query parts HOT 3
- Double Quotes NOT preserved after parsing HOT 2
- Support statement types similar to referenced relations HOT 3
- Failed to install with pip (python 3.10.11) HOT 1
- ParseError when handling a statement containing a UUID HOT 1
- Token's reported location shifts when query has Turkish characters HOT 6
- Safety belt triggered HOT 2
- Duplicate `DEFERRABLE INITIALLY DEFERRED` in output HOT 3
- Can't compile with glibc >= 2.38 HOT 2
- pgpp remove important parentheses HOT 3
- Support PG16 HOT 6
- TypeError while init RawStmt from query parse tree dict which has A_Star. HOT 2
- (32-bit) FETCH ALL -> FETCH 2147483647 HOT 3
- Printing of AlterOwnerStmt for operator class results in error. HOT 3
- pglast>-6 install from wheel is missing symbol HOT 11
- referenced_relations: incorrectly treating LATERAL-ly-joined aliases as real relations HOT 4
- Question about the traverse method on v6 HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pglast.