Buffer overflows in PostgreSQL 7.2 allow attackers to cause a denial of service and possibly execute arbitrary code via long arguments to the functions (1) lpad or (2) rpad.
https://euvd.enisa.europa.eu/vulnerability/EUVD-2002-0961
http://www.redhat.com/support/errata/RHSA-2003-001.html