Subject Too many Contexts ... Maximum allowed is 127.
Author Valdir Stiebe Junior - Dype Soluções
Hi!

Some questions regarding this error: Too many Contexts of
Relation/Procedure/Views. Maximum allowed is 127.

1. It is possible to raise the maximum contexts allowed (via config file
or recompiling)?

2. What is a context?
2.1. When it is created?
2.2. When it is released?
2.3. Why only 127 are allowed?

3. What are the alternatives for what I am trying to do (follow a little
explanation)?

I am getting this error when I try to select from a view.
This view's query is a union .. union .. union (at least three unions, but
I will need more).
Each select statement that composes this union looks like this one:

select
(select DESCRIPTION from V_OBJECT_DESC where ID_OBJECT = A.ID_USER)
USER,
(select DESCRIPTION from V_OBJECT_DESC where ID_OBJECT = A.ID_OBJECT)
DESCRIPTION
from
AUDIT A inner join
PERSON P on P.ID_PERSON = A.ID_OBJECT

And the view's V_OBJECT_DESC query looks like this (V_PHONE is also a
view):

select
case
when O.KIND = 'PERSON' then
(select NAME from PERSON where ID_PERSON = O.ID_OBJECT)
when O.KIND = 'PHONE' then
(select PHONE_DESC from V_PHONE where ID_PHONE = O.ID_OBJECT)
...
... at least five or six views are called here
...
else
null
end DESCRIPTION
from
OBJECT O

--
Valdir Stiebe Junior
Dype Soluções

Using Opera's revolutionary e-mail client: http://www.opera.com/mail/