Bruce Momjian <pgman@candle.pha.pa.us> writes:
> Tom Lane wrote:
>> Actually ... does Oracle have SQLSTATEs assigned to these errors?
>> If so, maybe we should use theirs. I had the idea they were still
>> stuck on non-spec-compatible error numbers, though.
> Anyone?
I did some googling and found one page that says no_data_found is
ORA-01403 and too_many_rows is ORA-01422. Another page said that
ORA-01403 maps to SQLSTATE 02000 (which is exactly what we need to
avoid to be spec-compliant) and they don't give a mapping at all
for ORA-01422 :-(. So once again, Oracle is totally useless as a
precedent for SQLSTATE choices.
I'll go with a couple of codes in the P0 class for the moment.
If anyone has a better idea, it won't be hard to change.
regards, tom lane