From: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
---|---|
To: | Bill Studenmund <wrstuden(at)netbsd(dot)org> |
Cc: | PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Package support for Postgres |
Date: | 2001-10-13 19:22:29 |
Message-ID: | Pine.LNX.4.30.0110132111270.643-100000@peter.localdomain |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Bill Studenmund writes:
> So what are packages? In Oracle, they are a feature which helps developers
> make stored procedures and functions.
I think you have restricted yourself too much to functions and procedures.
A package could/should also be able to contain views, tables, and such.
> They provide a name space for functions local to the package,
Namespacing is the task of schemas. I think of packages as a bunch of
objects that can be addressed under a common name (think RPMs).
But it seems like some of this work could be used to implement schema
support.
> session-specific package variables,
I think this is assuming a little too much about how a PL might operate.
Some PLs already support this in their own language-specific way, with or
without packages. Thus, I don't think packages should touch this.
Actually, I think you could easily set up session variables in the package
initializer function.
> The last component of a package are the functions usable for type
> declarations. They are declared as:
> BEFORE TYPE FUNCTION <standard package function declaration>
>
> They are useful as the normal functions in a package are declared after
> the types are declared, so that they can use a type newly-defined in a
> package.
I think it would make much more sense to allow the creation of objects in
the CREATE PACKAGE command in any order. PostgreSQL has not so far had a
concept of "functions suitable for type declarations" and we shouldn't add
one.
--
Peter Eisentraut peter_e(at)gmx(dot)net http://funkturm.homeip.net/~peter
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2001-10-13 19:23:43 | Re: FAQ error |
Previous Message | Tom Lane | 2001-10-13 19:08:19 | Re: EXTRACT broken |