Re: User's exception plpgsql
От | Pavel Stehule |
---|---|
Тема | Re: User's exception plpgsql |
Дата | |
Msg-id | Pine.LNX.4.44.0507061855560.23774-100000@kix.fsv.cvut.cz обсуждение исходный текст |
Ответ на | Re: User's exception plpgsql (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: User's exception plpgsql
|
Список | pgsql-patches |
> and maybe the short-term cheesy thing to do is special-case exactly this > syntax: > > RAISE LEVEL [ SQLSTATE(text_expr), ] text_expr [, ... ] > > which would give us the minimum functionality with a clear path to > expansion later. > or only RAISE LEVEL SQLSTATE(text_expr)|text_expr [, ...] if I use registered sqlstate, plpgsql knows text message. But I think this syntax has more questions than exception's variables. It's really problem declare one exceptio's variable? It's similar like using constant variables or magic values. Pavel DECLARE not_money EXCEPTION=SQLSTATE('U1101'); BEGIN IF account < 0 THEN RAISE EXCEPTION not_money; ... or BEGIN IF account < 0 THEN RAISE SQLSTATE ('U1101') 'Not money';
В списке pgsql-patches по дате отправления: