Tom Lane wrote:

There's been some discussion of inline-expanding SQL functions that
return sets when they are called in FROM, which would make a SQL
function that contains just a SELECT effectively equivalent to a view
as far as the planner's powers of optimization go.  No one's tried to
make it happen yet though.

This is exactly what would be brilliant in my case. Use the functions as a kind of strict, parameterized views, that in the planner (or wherever) gets replaced down to a simple (?!?!) sql-statement. This would imho be highly valuable for almost any kind of complex time-travel application (and surely dozens of other applications).

And before anyone suggests it, I don't code C well enough (*cough* rusty) to try to do it myself. I would apriciate if it went on the todo for 8.2 though. (I might even be willing to sponsor some money (a single or perhpas two thousands of US dollars) for getting it done and release it immediately under postgresql standard license (BSD)).

I by the way also support the idea of a way to force a table into a PgSQL managed cache like discussed a while ago. Sometimes overall speed for the system is less important than speed of a single query.

I must also say, that I am very impressed with the performance enhancements of 8.1 beta, the bitmap index scans are amazing ! Good job, guys - PgSQL has come a far way from 7.0 (where I started) and the future looks bright ;)


---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?


Reply via email to