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

From Karel Zak - Zakkr
Subject Re: [HACKERS] Cache query implemented
Date
Msg-id Pine.LNX.3.96.1000228144441.19731B-100000@ara.zf.jcu.cz
Whole thread Raw
In response to Re: [HACKERS] Cache query implemented  (Karel Zak - Zakkr <zakkr@zf.jcu.cz>)
Responses RE: [HACKERS] Cache query implemented  ("Hiroshi Inoue" <Inoue@tpf.co.jp>)
List 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 by date:

Previous
From: The Hermit Hacker
Date:
Subject: RE: [HACKERS] Re: ALTER TABLE DROP COLUMN
Next
From: Jose Soares
Date:
Subject: having and union in v7beta