Re: [PATCH] Add --syntax to postgres for SQL syntax checking
От | Tom Lane |
---|---|
Тема | Re: [PATCH] Add --syntax to postgres for SQL syntax checking |
Дата | |
Msg-id | 1815338.1715799685@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: [PATCH] Add --syntax to postgres for SQL syntax checking (walther@technowledgy.de) |
Ответы |
Re: [PATCH] Add --syntax to postgres for SQL syntax checking
|
Список | pgsql-hackers |
walther@technowledgy.de writes: > Tom Lane: >> BTW, if you do feel that a pure grammar check is worthwhile, you >> should look at the ecpg preprocessor, which does more or less that >> with the SQL portions of its input. > Would working with ecpg allow to get back a parse tree of the query to > do stuff with that? No, ecpg isn't interested in building a syntax tree. > This is really what is missing for the ecosystem. A libpqparser for > tools to use: Formatters, linters, query rewriters, simple syntax > checkers... they are all missing access to postgres' own parser. To get to that, you'd need some kind of agreement on what the syntax tree is. I doubt our existing implementation would be directly useful to very many tools, and even if it is, do they want to track constant version-to-version changes? regards, tom lane
В списке pgsql-hackers по дате отправления: