]> granicus.if.org Git - pgbouncer/commitdiff
Fix deallocate_all() in FAQ
authorMarko Kreen <markokr@gmail.com>
Thu, 1 Aug 2013 20:15:31 +0000 (23:15 +0300)
committerMarko Kreen <markokr@gmail.com>
Thu, 1 Aug 2013 20:15:31 +0000 (23:15 +0300)
8.1 requires loop var to be record.

Reported-by: Christopher Causer
doc/faq.txt

index 2d54c5bd9a5f8d80aff8c6867ba968bf2846abb0..27651652375a1d03c88dfde95a7ca43c637dae51 100644 (file)
@@ -55,13 +55,13 @@ following function can be created:
 CREATE OR REPLACE FUNCTION deallocate_all()
 RETURNS void AS $$
 DECLARE
-    sql text;
+    sql record;
 BEGIN
     FOR sql IN
-       SELECT 'deallocate ' || quote_ident(name)
+       SELECT 'deallocate ' || quote_ident(name) as stmt
          FROM pg_catalog.pg_prepared_statements
     LOOP
-       EXECUTE sql;
+       EXECUTE sql.stmt;
     END LOOP;
 END;
 $$ LANGUAGE plpgsql;