Re: PROPOSAL - User's exception in PL/pgSQL

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Pavel Stehule <stehule(at)kix(dot)fsv(dot)cvut(dot)cz>
Cc: Neil Conway <neilc(at)samurai(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: PROPOSAL - User's exception in PL/pgSQL
Date: 2005-06-21 22:17:44
Message-ID: 20522.1119392264@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Pavel Stehule <stehule(at)kix(dot)fsv(dot)cvut(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2005-06-21 22:21:56 Re: [PATCHES] Removing Kerberos 4
Previous Message Tom Lane 2005-06-21 22:01:06 Re: pg_terminate_backend idea