Tom Lane wrote:
Those cases are for places where the spec defines similar cases under
the error classes "SQL Routine Exception" and "External Routine Exception".
You can blame me for having assumed that plpgsql didn't need to
distinguish these cases.

Well, in and of itself, I agree it is probably better to combine similar SQLSTATEs into a single logical condition. However, considering the problem it poses for implementing RAISE with builtin condition names, IMHO it would be a net win to get rid of it, if we can't find a better solution.

So I see no backwards-compatibility argument that we can't change
this.  How would you want to do it better?

I would just change the mapping from condition names to SQLSTATEs to be one-to-one. If a client application does need to trap multiple SQLSTATEs for a logically similar condition, they can always specify "WHEN x OR y OR ..."

-Neil

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

              http://archives.postgresql.org

Reply via email to