Re: [HACKERS] Cache query implemented
| От | Karel Zak - Zakkr |
|---|---|
| Тема | Re: [HACKERS] Cache query implemented |
| Дата | |
| Msg-id | Pine.LNX.3.96.1000228144441.19731B-100000@ara.zf.jcu.cz обсуждение исходный текст |
| Ответ на | Re: [HACKERS] Cache query implemented (Karel Zak - Zakkr <zakkr@zf.jcu.cz>) |
| Ответы |
RE: [HACKERS] Cache query implemented
|
| Список | pgsql-hackers |
> > EXECUTE name [ INTO x, y, ... ] [ USING a, b, ... ]
>
> This command "Associate input parametrs and output targets with a prepared
> statement and execute the statement" (SQL92).
>
> 'INTO' - I really not sure if is possible in PG join more plans into
> one plan. If I good understand, INTO is targetlist for cached
> query, but in cached query is targetlist too. Is any way how join/replace
> targetlist in cached query with targetlist from EXECUTE's INTO?
> (QueryRewrite?). But, INTO for EXECUTE is nod bad idea.
Sorry, previous paragraph is stupid. The 'into' is simple item in
the query struct and not any targetlist. I spend more time with previous
stupidity than with implementation:
EXECUTE <name> [ INTO [ TEMPORARY | TEMP ] [ TABLE ] new_table ] [ USING val, ... ]
test=# prepare sel as select * from tab;
PREPARE
test=# execute sel into x;
SELECT
test=# select * from x;id | data
----+------ 1 | aaaa 2 | bbbb 3 | cccc 4 | dddd 5 | eeee
(5 rows)
The PostgreSQL source code is really very modular :-)
Karel
В списке pgsql-hackers по дате отправления: