mirror of
https://github.com/postgres/postgres.git
synced 2025-12-12 02:37:31 +03:00
Change EXECUTE INTO to CREATE TABLE AS EXECUTE.
This commit is contained in:
@@ -80,10 +80,10 @@ ERROR: Parameter $3 of type boolean cannot be coerced into the expected type do
|
||||
-- invalid type
|
||||
PREPARE q4(nonexistenttype) AS SELECT $1;
|
||||
ERROR: Type "nonexistenttype" does not exist
|
||||
-- execute into
|
||||
-- create table as execute
|
||||
PREPARE q5(int, text) AS
|
||||
SELECT * FROM tenk1 WHERE unique1 = $1 OR stringu1 = $2;
|
||||
EXECUTE q5(200, 'DTAAAA') INTO TEMPORARY q5_prep_results;
|
||||
CREATE TEMPORARY TABLE q5_prep_results AS EXECUTE q5(200, 'DTAAAA');
|
||||
SELECT * FROM q5_prep_results;
|
||||
unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4
|
||||
---------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+---------
|
||||
|
||||
@@ -38,8 +38,8 @@ EXECUTE q3(5::smallint, 10.5::float, false, 500::oid, 4::bigint, 'bytea');
|
||||
-- invalid type
|
||||
PREPARE q4(nonexistenttype) AS SELECT $1;
|
||||
|
||||
-- execute into
|
||||
-- create table as execute
|
||||
PREPARE q5(int, text) AS
|
||||
SELECT * FROM tenk1 WHERE unique1 = $1 OR stringu1 = $2;
|
||||
EXECUTE q5(200, 'DTAAAA') INTO TEMPORARY q5_prep_results;
|
||||
CREATE TEMPORARY TABLE q5_prep_results AS EXECUTE q5(200, 'DTAAAA');
|
||||
SELECT * FROM q5_prep_results;
|
||||
|
||||
Reference in New Issue
Block a user