Comments (4)
That's great, thank you!
I know that lots of nodes are missing, but given the impressive number of them, I think the most viable way is to add them as the need arise... I could not find a comprehensive collection of all possible statements. BTW, how are the "regression tests" you mention written? Could you point me there?
Wrt contributing back, I'm fine with a single PR, as long as there are tests against all added nodes, keeping test coverage as close to 100% as possible. That basically means adding SQL statements to tests/test_d?l_printers.py
(for example, in tests/test_dml_printers.py
there's a SELECTS
multiline string, with SQL statements separated by an empty line...) asserting that all the nodes get exercized.
Cannot promise on when I can do that, but I'm willing to take care of the prettification of the new nodes.
About the "printer overrides", that should be properly integrated, if possible.
Let me know if you need further advice!
from pglast.
Thank you, I will try to do that as soon as possible, hopefully this week.
The regression tests for PostgreSQL are mostly here: https://git.postgresql.org/gitweb/?p=postgresql.git;a=tree;f=src/test/regress/sql;h=381270746f8f42574dedd946c190e6a1be89d4ee;hb=HEAD
They consist in a set of sql file, each associated with an expected output. I think this makes for a great reference of which features are supported or not, since they should exercise every possible statement (in theory, I don't know the exact coverage though).
from pglast.
I could not find a comprehensive collection of all possible statements.
This isn't specific to postgres, but it might be useful: BNF Grammars for SQL-92, SQL-99 and SQL-2003
from pglast.
This has been released as of version 1.3. Thank you!
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.