"Euler Taveira" <eu...@eulerto.com> writes: > It is referring to the SPI_execute() return values [1] whose mapped integers > > are available in [2]. 11 refers to INSERT ... RETURNING. Maybe PL/Python > should > expose these SPI constants too (if it doesn't).
I wouldn't be in too much of a hurry to do that, because there's been repeated discussion of removing (or at least obsoleting) most of those codes in favor of throwing regular errors for the cases that represent error conditions. Better to wait to change plpython until after that dust settles. regards, tom lane