Re: PROPOSAL - User's exception in PL/pgSQL - Mailing list pgsql-hackers

From Tom Lane
Subject Re: PROPOSAL - User's exception in PL/pgSQL
Date
Msg-id 20522.1119392264@sss.pgh.pa.us
Whole thread Raw
In response to Re: PROPOSAL - User's exception in PL/pgSQL  (Pavel Stehule <stehule@kix.fsv.cvut.cz>)
Responses Re: PROPOSAL - User's exception in PL/pgSQL
List pgsql-hackers
Pavel Stehule <stehule@kix.fsv.cvut.cz> writes:
> I wont to prohibit synonyms in exception (every exception has unique 
> sqlstate).

I don't think that's a particularly good idea --- maybe if SQL had been
designed according to your worldview, it'd be like that, but it isn't
and you can't retroactively force it to be.  The SQLSTATEs are
deliberately designed to be fairly coarse, not unique.  I believe the
design intention is to distinguish between two cases when it's likely
that client application code would do something different in the two
cases.  Not to be "unique for uniqueness' sake".
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: pg_terminate_backend idea
Next
From: Tom Lane
Date:
Subject: Re: [PATCHES] Removing Kerberos 4