Re: How to use the SQL parser subsystem

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: How to use the SQL parser subsystem
Дата
Msg-id 16997.1167924042@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: How to use the SQL parser subsystem  (Martijn van Oosterhout <kleptog@svana.org>)
Список pgsql-general
Martijn van Oosterhout <kleptog@svana.org> writes:
> On Thu, Jan 04, 2007 at 08:01:17PM +0530, Ravindra Jaju wrote:
>> 2] If yes, I found that none of the shared library files expose this
>> function - I could not link a simple C program with this function
>> successfully. (I tried all the .so files related to postgres! :-()

> It's inside the server, it's not in a seperate library. To use it you
> need to be inside the server.

By and large there is no part of the backend that is designed to be run
standalone --- almost everything relies on palloc and elog, for instance.
I concur with the suggestion to consider doing this as a backend
function rather than in a standalone program.

Note that what raw_parser gives you is the raw grammar output, which is
probably not really what you want.  For almost any sort of interesting
analysis, I'd think you'd want to run the syntax tree through
parse_analyze() or one of its siblings, so that semantic interpretation
gets done.  There is definitely no hope of pulling out parse_analyze(),
because it has to consult the catalogs ...

            regards, tom lane

В списке pgsql-general по дате отправления:

Предыдущее
От: "Ravindra Jaju"
Дата:
Сообщение: Re: How to use the SQL parser subsystem
Следующее
От: Arindam
Дата:
Сообщение: Moving from 7.2.1 to 8.1.5 - looking for jdbc