From: | Karel Zak - Zakkr <zakkr(at)zf(dot)jcu(dot)cz> |
---|---|
To: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
Cc: | Jan Wieck <wieck(at)debis(dot)com>, Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers <pgsql-hackers(at)postgreSQL(dot)org> |
Subject: | Re: [HACKERS] Cache query implemented |
Date: | 2000-02-28 14:03:17 |
Message-ID: | Pine.LNX.3.96.1000228144441.19731B-100000@ara.zf.jcu.cz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Jose Soares | 2000-02-28 14:13:51 | having and union in v7beta |
Previous Message | The Hermit Hacker | 2000-02-28 13:17:59 | RE: [HACKERS] Re: ALTER TABLE DROP COLUMN |