Re: Postgreqsl & Package - Mailing list pgsql-general

From Shridhar Daithankar
Subject Re: Postgreqsl & Package
Date
Msg-id 200310221654.10454.shridhar_daithankar@myrealbox.com
Whole thread Raw
In response to Postgreqsl & Package  ("Birahim FALL" <birahim.fall@hispeed.ch>)
Responses RE : Postgreqsl & Package
List pgsql-general
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


pgsql-general by date:

Previous
From: "Birahim FALL"
Date:
Subject: Postgreqsl & Package
Next
From: Shridhar Daithankar
Date:
Subject: Re: Same conditions, different planning?