Yes, the problem is not only with version 9. The problem started with the "returning *", that from my perspective is a very error prone solution and of course it shows a poorly designed driver.
The question is: is it very difficult to change that to a more correct returning [identifier] ?
Because of this error, third parties like hibernate expects that the first returned element is the identifier, but that doesn't always happens. Sometimes it returns a discriminator, sometimes it could be something else that could be a long, and that could be disastrous if third party uses this number as a identifier in an application.
I've suffered from this problem for several years now. The answer was to not use a serial column with the identity id generator type in hibernate, since it is the id generator that adds the 'returning *' clause (I think. It's been a long time since I looked into it. I tried to figure out how to rewrite the hibernate sql grammar for jdbc so that it wouldn't use returning * but gave up after wasting several hours on it). Going back to explicitly declaring a sequence for generating the id and then using the sequence id generator fixed the problem for me. It is slightly less efficient, but if efficiency were your primary concern, you probably wouldn't be using hibernate. This problem shows up in my codebase because I've got some tables that have a common parent table, but the id columns are declared in the child tables - so the id column isn't the first column in the table definition. I guess that so long as you declare all tables with the id column first, it wouldn't be a problem. I don't think it is a postgres problem. It's a hibernate problem.