CVE-2010-0733 (http://nvd.nist.gov/nvd.cfm?cvename=CVE-2010-0733): Integer overflow in src/backend/executor/nodeHash.c in PostgreSQL 8.4.1 and earlier, and 8.5 through 8.5alpha2, allows remote authenticated users to cause a denial of service (daemon crash) via a SELECT statement with many LEFT JOIN clauses, related to certain hashtable size calculations.
There are no 8.5 ebuilds left, stabling through bug 312171 should get 8.4 up to a non-vulnerable version.
Patrick meant bug 320967. Bug 312171 is unrelated to this bug.
Updated dependency to the proper bug.
This issue was resolved and addressed in GLSA 201110-22 at http://security.gentoo.org/glsa/glsa-201110-22.xml by GLSA coordinator Alex Legler (a3li).