[moving to -hackers]
Dmitry Karasik wrote:
I have committed the patch and docs for this - it's an important feature
and I would like people banging on it.
I'd like to review the API we provide to plperl, though - I don't like
it much. I think that should be an 8.2 TODO.
Thanks!
If you'd be interested in my opinion, I thought that probably it would be
beneficial to have two layers of access to SPI, first, the existing spi_xxx()
set, and second, fully object oriented, with 'SPI->new' or
'SPI->query->rows->data' or whatever else imagined. That would've been a good
design for an average Perl XS module, because XS layer would only introduced
direct mappings to C functions, and the accompanied perl code in .pm file would
implement object bells and whistles based on C API as seen from perl. That's a
bit bloatish, so I'd understand if you would want to completely rewrite the
Perl API, however, I'd propose to do that in two phases: first, introduce
object API that is implemented on well-known spi_xxx(), and then, if necessary,
get rid of the latter.
Well, if we want an OO API I'd like to get to where we have a DBI
handle. Perl programmers are familiar with how it works. In plperl it
would just be there (no need to open/close it). Someone already did
this, although it got dataed and is GPLed so we can't include it in the
postgresl core. But that's what I and many other plperl people want.
I would also like to see a nice clean procedural API, rather more
lightweight than DBI. But I don't think we need to be mirroring the SPI
API. The fact that we use SPI is an implementation detail. I know pltcl
calls things spi_foo. But especially if we are not exactly mirroring a
call in SPI we should not do that, IMNSHO.
btw, would be me appropriate to move the discussion into [EMAIL PROTECTED]
yes. done.
cheers
andrew
---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faq