Re: Standalone Parser for PL/pgSQL
От | Neil Conway |
---|---|
Тема | Re: Standalone Parser for PL/pgSQL |
Дата | |
Msg-id | 42D5EADB.5050905@samurai.com обсуждение исходный текст |
Ответ на | Re: Standalone Parser for PL/pgSQL (Alvaro Herrera <alvherre@alvh.no-ip.org>) |
Ответы |
Re: Standalone Parser for PL/pgSQL
|
Список | pgsql-general |
Alvaro Herrera wrote: > I don't think you can use just plpgsql's parser. The problem is that it > relies on the main backend parser to figure out anything it doesn't > understand. I think it depends on what kind of information you want to extract from a PL/PgSQL function definition. The PL/PgSQL parser handles the structure of the PL/PgSQL function definition itself, but it does not parse expressions or SQL queries. Those are essentially treated as strings that are later handed to the main SQL machinery to be parsed and evaluated. If you're content to treat expressions and SQL queries as opaque strings, you shouldn't need to concern yourself with the main SQL parser. > The main parser depends (at least) on the List handling and memory > handling. So your "simple standalone parser" will have to contain both > things at least. The PL/PgSQL parser also depends on these, although to a lesser degree. -Neil
В списке pgsql-general по дате отправления: