From: | "Karl O(dot) Pinc" <kop(at)meme(dot)com> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Remove #include psqlscan.c from psql |
Date: | 2012-09-27 05:43:19 |
Message-ID: | 1348724599.28442.0@mofo |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
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(at)meme(dot)com>
Free Software: "You don't pay back, you pay forward."
-- Robert A. Heinlein
Attachment | Content-Type | Size |
---|---|---|
psql_remove_include.patch | text/x-patch | 2.2 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Amit Kapila | 2012-09-27 05:50:56 | Re: Re: [WIP] Performance Improvement by reducing WAL for Update Operation |
Previous Message | Tom Lane | 2012-09-27 04:48:39 | Re: Re: [WIP] Performance Improvement by reducing WAL for Update Operation |