Hello, I encountered the same problem, after some investigation it seems that the problem is in the "/usr/share/postgresql-common/supported-versions" script
when the function lsb_debian is called it takes the output of `lsb_release -rs`, wich on my system returns "3.1" not "testing/unstable" the following patch fixes the configure action. Richard Renard.
supported-versions.fix
Description: Binary data