Thread
-
Remove #include psqlscan.c from psql
Karl O. Pinc <kop@meme.com> — 2012-09-27T05:43:19Z
Hi, This patch eliminates the #include of psqlscan.c at the bottom of mainloop.c. The attached patch uses the %top{} flex feature introduced in flex 2.5.30 released 2003-4-1. (See the NEWS file for flex.) The good news is that config/programs.m4 requires flex >= 2.5.31. The bad news is that RHEL 5 (released 2007-03-14 with a 13 year (10+3 years) support lifecycle) has a flex (2.5.4a) that is too old for this patch. :-( (At least this is what the changelog in flex from the RHEL 5 srpm repo tells me.) I don't know what this means. The patch is against git head. All the tests pass, fwiw. Because this depends on the toolchain it wouldn't hurt to build on other architectures/ operating systems. I'm thinking of exposing enough of the psql parser, moving it to libpq, that any client-side app can do what libpq does; given a bunch of sql separated by semi-colons get the results of all the statements. This should also allow the "statement separation" to be done on the client side in libpq. Although I don't imagine that this will have a performance impact on the server side it sounds like a first step toward pushing more of the parsing onto the client. Regards, Karl <kop@meme.com> Free Software: "You don't pay back, you pay forward." -- Robert A. Heinlein