Re: Again, sorry, caching, (Tom What do you think: function - Mailing list pgsql-hackers

From mlw
Subject Re: Again, sorry, caching, (Tom What do you think: function
Date
Msg-id 3C975A7C.6560C7C5@mohawksoft.com
Whole thread Raw
In response to Re: Again, sorry, caching, (Tom What do you think: function  (Gavin Sherry <swm@linuxworld.com.au>)
Responses Re: Again, sorry, caching, (Tom What do you think: function  (Jan Wieck <janwieck@yahoo.com>)
List pgsql-hackers
Gavin Sherry wrote:
> I'm not sure that cached results is a direction postgres need move in. But
> if it does, I think this a better way to do it (given that I may have
> overlooked something) than modifying the function manager (argh!).

I actually had an anterior motive.

Your comment about caching not being a direction in which PostgreSQL needs to
move, says it all. The general rank and file seems to agree. I think caching
could speed up a number of things, certainly some of the stuff I have been
working on. I think it would be more likely to get some sort of caching from a
contrib project rather than to sway the core team.

IMHO modifying the function manager to allow the return of a full row, and a
"set of" full rows, answers a LOT of issues I have seen over the years with
PostgreSQL extensibility.

With a full row function API we can implement:

(1) Remote Queries
select remotequery(hostname, port, 'select * from foo');

(2) External queries
select mysqlquery(hostname, port, 'select * from foo');

(3) Cached queries
select cachedquery('select * from foo');

(4) Full text search
select ftssquery(hostname, port, 'word1 and word2 and word3 not word4');

Again, with full row functions, we could prototype/implement many advanced
features in PostgreSQL as contrib projects.


pgsql-hackers by date:

Previous
From: Adrian 'Dagurashibanipal' von Bidder
Date:
Subject: Re: Platform comparison ...
Next
From: Tom Lane
Date:
Subject: Re: fault tolerance...