I\'m using PostgreSQL 9.2.4.
postgres=# select version();
version --------------------------------------------------------
A function can only return one type. In your case, you could create a composite type with two fields, one integer and one text, and return that.