Search Postgresql Archives

Re: How to use the SQL parser subsystem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Martijn van Oosterhout <kleptog@xxxxxxxxx> 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


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux