@@ -82,16 +82,28 @@ psql -p 5433 -c "SELECT pg_exec_stored_plan('../test.txt');"
82
82
# ENUMOID -----------------------------------------------------------------------
83
83
psql -p 5432 -c " SELECT pg_store_query_plan('../test.txt', 'INSERT INTO bug (description, status) VALUES (''abc3'', ''new''::tests.bug_status);');"
84
84
psql -p 5433 -c " SELECT pg_exec_stored_plan('../test.txt');"
85
- # psql -p 5432 -c "SELECT pg_store_query_plan('../test.txt', 'SELECT * FROM bug WHERE status=''open''');"
86
- # psql -p 5433 -c "SELECT pg_exec_stored_plan('../test.txt');"
85
+
87
86
echo " ENUMOID test"
88
- # psql -p 5432 -c "INSERT INTO public.bug1 (status) VALUES ('new');"
89
87
psql -p 5432 -c " SELECT pg_store_query_plan('../test.txt', '
90
88
SELECT A.description, B.id
91
89
FROM bug as A, bug1 AS B
92
90
WHERE A.status = B.status;
93
91
');"
94
92
psql -p 5433 -c " SELECT pg_exec_stored_plan('../test.txt');"
95
- psql -p 5432 -c " SELECT * FROM bug;"
96
- psql -p 5432 -c " SELECT * FROM bug1;"
93
+
94
+ # Prepared operator
95
+ psql -p 5432 -c " PREPARE abc (TEXT, tests.bug_status) AS
96
+ INSERT INTO bug (description, status)
97
+ VALUES (\$ 1,\$ 2);
98
+ SELECT pg_store_query_plan('../test.txt', '
99
+ EXECUTE abc(''test1'', ''closed'')
100
+ ');"
101
+
102
+ psql -p 5433 -c " PREPARE abc (TEXT, tests.bug_status) AS
103
+ INSERT INTO bug (description, status)
104
+ VALUES (\$ 1,\$ 2);
105
+ SELECT pg_exec_stored_plan('../test.txt');"
106
+
107
+ psql -p 5433 -c " SELECT * FROM bug;"
108
+ psql -p 5433 -c " SELECT * FROM bug1;"
97
109
0 commit comments