RE : Postgreqsl & Package

Поиск
Список
Период
Сортировка
От Birahim FALL
Тема RE : Postgreqsl & Package
Дата
Msg-id 003901c39891$6cb7f1a0$3e00a8c0@venus
обсуждение исходный текст
Ответ на Re: Postgreqsl & Package  (Shridhar Daithankar <shridhar_daithankar@myrealbox.com>)
Ответы Re: Postgreqsl & Package
Список pgsql-general
Thanks, Shridhar,
I've read something like that in my search this morning!
But doing that you can have only one package in the scope of a schema.
Then in a multipackage project these packages cannot access directly to
the same objects.
In you eg. We could have a table a.people, and it is not in a scope
accessible to b.test1 without a grant statement.
More info is welcomed,
Otherwise thanks a lot.
Bir

-----Message d'origine-----
De : pgsql-general-owner@postgresql.org
[mailto:pgsql-general-owner@postgresql.org] De la part de Shridhar
Daithankar
Envoyé : mercredi, 22. octobre 2003 13:24
À : pgsql-general@postgresql.org
Objet : Re: [GENERAL] Postgreqsl & Package


On Wednesday 22 October 2003 16:41, Birahim FALL wrote:
> Hi,
> I was an oracle dev/admin and I'm quite new to postgresql. Postgresql
> is great, but something bothers me. It seems that there's no concept
> of PACKAGE in PL/pgSQL as in Oracle PL/SQL.
> Is is definitely that? or did I missed something? or is it planned for
a
> future version?

You can use scemas instead of packages.  You still might miss few
details
w.r.t oracle package but in general that should fill in the gap pretty
nicely.

Check the following

test=# create schema a;
CREATE SCHEMA
test=# create schema b;
CREATE SCHEMA
test=# create function a.test1() returns boolean as 'begin test'# return
true; test'# end;' language plpgsql; CREATE FUNCTION test=# create
function b.test1() returns boolean as 'begin test'# return false; test'#
end;' language plpgsql; CREATE FUNCTION test=# select a.test1();  test1
-------
 t
(1 row)

test=# select b.test1();
 test1
-------
 f
(1 row)

HTH

 Shridhar


---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if
your
      joining column's datatypes do not match


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

Предыдущее
От: Shridhar Daithankar
Дата:
Сообщение: Re: Same conditions, different planning?
Следующее
От: "Birahim FALL"
Дата:
Сообщение: Identifier max length