Re: WHEN SQLSTATE '00000' THEN equals to WHEN OTHERS THEN

2025-03-19 Thread Tom Lane
David Fiedler writes: > I've stumbled across a code that used this condition, resulting in > unexpected behavior. I think it worths a note that catching 0 is not > possible and that it results in a catch all handler. Hmph. The code thinks * OTHERS is represented as code 0 (which wo

WHEN SQLSTATE '00000' THEN equals to WHEN OTHERS THEN

2025-03-19 Thread David Fiedler
Hi, I've stumbled across a code that used this condition, resulting in unexpected behavior. I think it worths a note that catching 0 is not possible and that it results in a catch all handler. What do you think? Should I post the expected text somewhere? Thanks, David Fiedler -- *David Fied