From: | Pavel Stehule <stehule(at)kix(dot)fsv(dot)cvut(dot)cz> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Neil Conway <neilc(at)samurai(dot)com>, <pgsql-patches(at)postgresql(dot)org> |
Subject: | Re: User's exception plpgsql |
Date: | 2005-07-06 17:31:18 |
Message-ID: | Pine.LNX.4.44.0507061919410.23774-100000@kix.fsv.cvut.cz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-patches |
On Wed, 6 Jul 2005, Tom Lane wrote:
> Pavel Stehule <stehule(at)kix(dot)fsv(dot)cvut(dot)cz> writes:
> > if I use registered sqlstate, plpgsql knows text message.
>
> No, it does not. I already pointed out that tying a single error
> message to a SQLSTATE is unreasonable, because that's not how the
> SQL committee intended SQLSTATEs to be used. I haven't looked at
> this patch yet, but if it's doing things that way it is wrong.
>
no, raise stmt still needs message text (patch)
> regards, tom lane
>
What I wont. Maybe I going in wrong direction. Please, correct me. User's
exception needs and will needs message text. I don't wont to introduce
wrong programming style. But if I use exception variable and have to use
its, then there is not only SQLSTATE but there exist name of exception
too. But I wont to simplify using system's exception. The system knows all
what need: name, text, sqlstate. And in mostly time I don't wont to
substitute text of system message. But if I wont to show it, I have to
copy it.
example:
raise exception div_by_zero; -- I wont to use system message, why not?
but now, I have to do
raise exception div_by_zero, 'division by zero ...'
Regards
Pavel
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Perry | 2005-07-06 17:36:00 | Re: By Passed Domain Constraints |
Previous Message | Pavel Stehule | 2005-07-06 17:19:15 | Re: User's exception plpgsql |
From | Date | Subject | |
---|---|---|---|
Next Message | Pavel Stehule | 2005-07-06 17:42:41 | Re: User's exception plpgsql |
Previous Message | Pavel Stehule | 2005-07-06 17:19:15 | Re: User's exception plpgsql |