From: | Tim Kientzle <kientzle(at)acm(dot)org> |
---|---|
To: | Lincoln Yeoh <lyeoh(at)pop(dot)jaring(dot)my> |
Cc: | Mike Mascari <mascarm(at)mascari(dot)com>, PostgreSQL general mailing list <pgsql-general(at)postgresql(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Subject: | Re: Failed Statements within Transactions |
Date: | 2000-12-31 01:11:26 |
Message-ID: | 3A4E87BE.22B46BB5@acm.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Lincoln Yeoh wrote:
> Also I prefer database errors to be exceptions, not
> something that occurs normally. Maybe I'm strange
> but I dislike the idea of _using_ errors. Seems
> rather kludgy, and hints that there is a design
> issue somewhere.
Unfortunately, in this case, the design issue is in the
SQL language itself which does not provide good support
for this common operation (atomically ensuring that a
unique data item is in a table). Unfortunately, it's
a little late to change that... ;-)
An "error" is just a return code that indicates what
happened. If return codes are well designed, then
they are useful and should be used. Don't be fooled
by the word "error." It's only an error if the program
ends up doing the wrong thing. ;-)
- Tim
From | Date | Subject | |
---|---|---|---|
Next Message | Thomas T. Thai | 2000-12-31 01:57:59 | Re: NetBSD/Alpha and PostgreSQL-current [was Re: NetBSD/Alpha and rkirkpat's patch] |
Previous Message | Tom Lane | 2000-12-31 01:10:58 | Re: NetBSD/Alpha and PostgreSQL-current [was Re: NetBSD/Alpha and rkirkpat's patch] |