Sam Mason <[EMAIL PROTECTED]> writes: > For SPI, I'm thinking that I'd currently like to attempt some object > orientated style interface. ... > So running some SQL would probably look something like:
> for (row in spi.prepare("SELECT 1 AS n").query()) { > print(row.n); > } What's not apparent to me is how one can avoid re-planning the query every single time the function is called? More generally, I think that the average programmer would rather just not be bothered with all these details; he'd want to write for (row in spi.query("...sql..." [, arguments])) { ... I don't object to exposing the machinery for those who like to play with such stuff, but you should have shortcuts to keep the simple things simple. regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq