Re: Oracle Style packages on postgres

Поиск
Список
Период
Сортировка
От Josh Berkus
Тема Re: Oracle Style packages on postgres
Дата
Msg-id 200505091846.52961.josh@agliodbs.com
обсуждение исходный текст
Ответ на Re: Oracle Style packages on postgres  (Bruce Momjian <pgman@candle.pha.pa.us>)
Ответы Re: Oracle Style packages on postgres
Список pgsql-hackers
Bruce,

> > b) Schemas do not provide us with any way of limiting the scope of
> > functions and persistent variables.  With packages, you would want:
> >     1. functions which can only be called internally to the package
> >     2. variables which are only visible inside the package
> >     3. functions which can only be called as part of the package (thus
> > utilizing the initialization and internal variables) and not on their
> > own.
>
> What if we defined functions to look in their own schemas for functions
> they call, then use the search_path, rather than using the search path
> first?

That really doesn't address the desired functionality.  For example, I could 
have a package whose initialization function involves some security checks, 
and then the package's "methods" (internal functions) would access the 
variables set by the security check function ... but those variables would 
NOT be available to the user or modifiable by them.

I know the need for this is probably hypothetical to a lot of -hackers, but 
it's pretty common programming in the Oracle PL/SQL world.  

Of course, if there's something in SQL2003 that supports this, it would be 
really keen to know it ...

-- 
--Josh

Josh Berkus
Aglio Database Solutions
San Francisco


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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Oracle Style packages on postgres
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Oracle Style packages on postgres