Re: Oracle Style packages on postgres

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

> This is exactly the sort of argumentation that got the last proposal
> shot down ;-).  I see no reason that you can't do the namespacing and
> security as well or better using the existing (and more standard) schema
> feature.  If there's something there that's not covered, what is it?

a) When you have 1000's of procedures, it becomes very useful to have more 
than one level of namespacing.   This is not an exaggeration; one project I 
looked at who decided not to convert from Oracle to PostgreSQL had over 
100,000 procedures and functions.   Lack of packages was their main reason 
for not switching.  Schemas provide only *one* level of namespacing, unless 
we want to "improve" on the SQL standard and allow nested schemas.

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
package2.variables which are only visible inside the package3. functions which can only be called as part of the
package(thus utilizing 
 
the initialization and internal variables) and not on their own.

-- 
--Josh

Josh Berkus
Aglio Database Solutions
San Francisco


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

Предыдущее
От: Hannu Krosing
Дата:
Сообщение: Re: Inline PL/pgSQL
Следующее
От: David Fetter
Дата:
Сообщение: Re: Inline PL/pgSQL