Buffer overflow in gram.y for PostgreSQL 8.0.0 and earlier may allow attackers to execute arbitrary code via a large number of arguments to a refcursor function (gram.y), which leads to a heap-based buffer overflow, a different vulnerability than CVE-2005-0247.
https://oval.cisecurity.org/repository/search/definition/oval%3Aorg.mitre.oval%3Adef%3A10175
https://exchange.xforce.ibmcloud.com/vulnerabilities/19188
http://www.securityfocus.com/bid/12417
http://www.redhat.com/support/errata/RHSA-2005-150.html
http://www.redhat.com/support/errata/RHSA-2005-138.html
http://marc.info/?l=bugtraq&m=110806034116082&w=2
http://archives.postgresql.org/pgsql-committers/2005-02/msg00049.php
http://archives.postgresql.org/pgsql-committers/2005-01/msg00298.php