Calculating the table_alias_length in the jdbc postgres adapter seems to be broken. This results in wrong truncation of generated field aliases (the things after "AS" in SQL - don't know the official name though) which would result in a wrong deserialization of the result.
In the attached diff, you may find a test and a working patch to fix the bug.
The diff may also be found on GitHub
.
P.S.: Sorry for sending a pull request and reporting a bug. I did not want to bother. I was just not sure, which one would be easier for you.