[#1011331] Documentation error for deallocate_all() in FAQ

View Trackers | Bugs | Download .csv | Monitor

Date:
2013-05-07 14:28
Priority:
3
State:
Open
Submitted by:
Christopher Causer (chy-causer)
Assigned to:
Nobody (None)
Category:
None
Group:
None
Resolution:
None
 
Summary:
Documentation error for deallocate_all() in FAQ

Detailed description
Hi,

Not sure if this is the correct forum to post a mistake in the documentation:

http://pgbouncer.projects.pgfoundry.org/doc/faq.html#_cleaning_prepared_statements_on_postgresql_8_2_and_older

Trying to create the function on my postgres 8.1 server gave me:

ERROR: loop variable of loop over rows must be record or row variable at or near "LOOP" at character 210

I was able to create the function as follows:

CREATE OR REPLACE FUNCTION deallocate_all()
RETURNS void AS $$
DECLARE
sql record;
BEGIN
FOR sql IN
SELECT 'deallocate ' || quote_ident(name)
AS text
FROM pg_catalog.pg_prepared_statements
LOOP
EXECUTE sql.text;
END LOOP;
END;
$$ LANGUAGE plpgsql;

Followup

No Followups Have Been Posted

Attached Files:

Changes:

No Changes Have Been Made to This Item

Powered By FusionForge