| From: | Marko Kreen <markokr(at)gmail(dot)com> |
|---|---|
| To: | Postgres Hackers <pgsql-hackers(at)postgresql(dot)org> |
| Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Subject: | Re: [patch] libpq one-row-at-a-time API |
| Date: | 2012-07-21 19:49:07 |
| Message-ID: | 20120721194907.GA28021@gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Here is 2 approaches how to get to state where only PQsetSingleRowMode()
is available. Both on top of REL9_2_STABLE branch.
a) Remove callback hooks, keep rowBuf, implement single-row-mode on
top of that. This was posted before, I just additionally removed
the PQgetRowData() function.
git pull git://github.com/markokr/postgres.git single-row-mode1
https://github.com/markokr/postgres/commits/single-row-mode1
Commits:
libpq: Single-row based processing
libpq, dblink: Remove row processor API
Advantage: makes easier to play with PQgetRowData() or potatial
faster PGresult creation methods. Smaller change compared to
libpq from 9.2beta than b).
b) Revert row-callback changes completely, implement single-row-mode on
top of virgin libpq. Only problem here was keeping fixes implemented
as part of row-callback patch. Single-row-mode itself is quite simple.
git pull git://github.com/markokr/postgres.git single-row-mode1
https://github.com/markokr/postgres/commits/single-row-mode1
Feature patch:
https://github.com/markokr/postgres/commit/b5e822125c655f189875401c61317242705143b9
Commits:
dblink: revert conversion to row processor API patch
libpq: revert row processor API patch
libpq: random fixes
libpq: single-row mode
dblink: use single-row-mode
Advantage: smaller change compared to libpq from 9.1 than a).
As the patch has suffered a lot from trying to provide both macro- and
micro-optimization (on-the-fly row processing vs. more efficient row
processing), maybe b) is safer choice for 9.2?
In case somebody wants to look at the patches without git (or web),
I attaches them as tgz too.
--
marko
| Attachment | Content-Type | Size |
|---|---|---|
| single-row.tgz | application/x-gtar | 36.9 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2012-07-21 22:23:30 | Re: 9.2 release schedule |
| Previous Message | Tom Lane | 2012-07-21 17:05:16 | Re: 9.2 release schedule |