D'Arcy J.M. Cain wrote:
Christoph Zwerschke wrote:
Using "returning *" will of course not solve this problem since it
will also fail if there is no select privilege, but it is more
efficient, and it will also work when the table has no oids. But
unfortunately, the returnig clause exists only in Postgres >= 8.2.
Maybe this and other method should get another parameter "use_oids"
with a default value that can be set or changed for the complete
DB() instance.

This issue could be put off until later since it is an optimization. We can introduce that in a minor release.

I've just added a method for retrieving the server version. This would allow us to make a case distinction and use the "returning" clause only for versions newer than 8.2.

However, if we use the returning clause, then the insert statement does not return the oid, so we have to explicitly request it with "returning oid,*", but this will break for tables without oid. I agree we need to reconsider the whole oid handling in one of the next versions, but leave things as they are now since we don't want to hold up 4.0 any longer.

-- Christoph
_______________________________________________
PyGreSQL mailing list
[email protected]
http://mailman.vex.net/mailman/listinfo/pygresql

Reply via email to