Re: [HACKERS] Cache query implemented - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: [HACKERS] Cache query implemented
Date
Msg-id Pine.LNX.4.21.0002251507370.3063-100000@localhost.localdomain
Whole thread Raw
In response to [HACKERS] Cache query implemented  (Karel Zak - Zakkr <zakkr@zf.jcu.cz>)
Responses Re: [HACKERS] Cache query implemented  (Karel Zak - Zakkr <zakkr@zf.jcu.cz>)
List pgsql-hackers
Karel Zak - Zakkr writes:

>  I still not sure with PREPARE/EXECUTE keywords, I vote for:
> 
>     CREATE PLAN name AS query [ USING type, ... ]
>     EXECUTE PLAN name [ USING values, ... ]
>     DROP PLAN name
> 
>  Comments? (Please. I really not SQL's standard guru...)

SQL seems to have something like the following. (Note: The section on
dynamic SQL is mostly incomprehensible to me.)

PREPARE name AS query
DESCRIBE INPUT name [ USING x, ... ]
DESCRIBE [OUTPUT] name [ USING x, ... ]
EXECUTE name [ INTO x, y, ... ] [ USING a, b, ... ]
DEALLOCATE PREPARE name

I'm not sure if these match exactly what you're doing, but if it is at all
possible to match what you're doing to these, I'd say it would be a shame
not to do it. You've got time.

Meanwhile I'm wondering whether it would not be possible to provide the
plan caching functionality even if all you do is send the same SELECT
twice in a row. Might be tricky, of course.

-- 
Peter Eisentraut                  Sernanders väg 10:115
peter_e@gmx.net                   75262 Uppsala
http://yi.org/peter-e/            Sweden



pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: ^C in psql (was Re: [HACKERS] Changes in 7.0)
Next
From: Don Baccus
Date:
Subject: Re: [HACKERS] LZTEXT for rule plan stings