Re: proposal for PL packages for 8.3.

From: "Pavel Stehule" <pavel(dot)stehule(at)hotmail(dot)com>
To: dev(at)archonet(dot)com, bruce(at)momjian(dot)us
Cc: josh(at)agliodbs(dot)com, tgl(at)sss(dot)pgh(dot)pa(dot)us, pgsql-hackers(at)postgresql(dot)org
Subject: Re: proposal for PL packages for 8.3.
Date: 2006-08-09 09:48:41
Message-ID: BAY20-F14D617E0D1147699FAA348F9550@phx.gbl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


>There are three separate issues we seem to be talking about.
>
>1. Namespaces - visibility or otherwise of objects
>2. Procedural state - something that looks like a shared variable
>3. Packaging - installation/dependency handling
>
and 4. support more languages:
4a) binary incompatibility between variables different PL
4b) two types for calling functions [native and SPI]

>Namespaces
>Given that we already have search_path it makes sense to use it. So, we
>could have something like:
>1. A "PRIVATE" modifier for objects that mean they are only accessible if
>their schema is the first in the search_path.
>2. A definable search_path for a schema, so all objects have that setting
>by default. In theory, this could break dynamic queries in functions that
>relied on a changeable search_path.
>
>Procedural state
>Just a convenient way of defining some small amount of state. Will need
>session variables and static shared variables. Presumably we'll need to be
>able to lock shared variables.
>
>Packaging
>I'd guess we'd need a pg_package and pg_package_items system tables. We
>could track:
>- package name (different from schema)
>- version number
>- install/uninstall functions
>- start-session/end-session functions
>- dependencies (is pg_depend enough)
>pg_package_items
>- schema-name
>- variables, functions, tables, views etc
>
it's strong but little bit complicated system. Start session and end
session is better to solve via session's triggers. Install, uninstall, +/- I
can understand sence, but I can call it manually. I need loader of package
which is evaluated when somebody first call any function from package. This
loader can initialize and create package variables (Perl don't has
variable's declaration). Can somebody say what is ANSI SQL? I haven't text
of it :-(. I found only basic syntax of "CREATE MODULE".

I thinking abaut session or schema variables. Which solve some kind of
problems. It's need some changes in parser, and part of code plpgsql can be
moved into parser.

Pavel

_________________________________________________________________
Emotikony a pozadi programu MSN Messenger ozivi vasi konverzaci.
http://messenger.msn.cz/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Florian G. Pflug 2006-08-09 10:57:39 Re: An Idea for planner hints
Previous Message Csaba Nagy 2006-08-09 09:38:10 Re: An Idea for planner hints