exception handling support in pgSQL

Поиск
Список
Период
Сортировка
От Paramveer.Singh@trilogy.com
Тема exception handling support in pgSQL
Дата
Msg-id OFE1CE4BDB.EF7681D4-ONE5256EF1.001A9767@trilogy.com
обсуждение исходный текст
Ответы Re: exception handling support in pgSQL  (Jeff <threshar@torgo.978.org>)
Список pgsql-general
Hi!
I am a developer working for a company which typically deploys apps on
Oracle.
We would like to move to postgres for obvious reasons.
However, most of  our legacy apps use the exception handling support
provided by PL/SQL.

Instead of porting each of these procedures by hand,
we would like to add exception handling support to pgSQL if possible.

I looked into the code for the pgSQL library, and as I understand it,
we can put support for user defined exceptions (something we use a lot)
within the pgSQL library by intercepting the
pgSQL call to SPI and moving to the handler locally.

However, it seems that for system level exceptions (like zero_divide) we
would have to go into SPI where it is executing the query plan.
Is this correct? or can we put the support for these in the library itself
somehow?

If we have to make changes in SPI (or even pgSQL), would the postgres
community be interested in accepting these changes into the core?

Finally, I was trying to understand the code for the library itself, and it
seems to use a namespace stack. Is this stack used for variable scope
resolution?
Exceptions (user defined) would also require scope resolution. Therefore,
would we have to implement it within this stack ? or can we put in another
stack for the exception resolution?

thanks
paraM




В списке pgsql-general по дате отправления:

Предыдущее
От: Robert Paulsen
Дата:
Сообщение: Re: idle processes
Следующее
От: Nikola Milutinovic
Дата:
Сообщение: PgSQL 8.0.0 - contributed: problem compiling