Thread: schema level variables

schema level variables

From
Paramveer.Singh@trilogy.com
Date:
Hi!
I am trying to port an oracle app to postgres, an I don't know what to do
with package scope variables.
I was looking up some documentation and it seems (IMHO) that schemas would
be a nice place to put the variables in(as they already have functions,
operators and types).
Is this feasible? Is the dev team interested in doing this at some point in
the future?

thanks
paraM



Re: schema level variables

From
Shridhar Daithankar
Date:
On Wednesday 15 Sep 2004 6:12 pm, Paramveer.Singh@trilogy.com wrote:
> Hi!
> I am trying to port an oracle app to postgres, an I don't know what to do
> with package scope variables.
> I was looking up some documentation and it seems (IMHO) that schemas would
> be a nice place to put the variables in(as they already have functions,
> operators and types).
> Is this feasible? Is the dev team interested in doing this at some point in
> the future?

Can you replace the package level variable name with a function? The function
would run a select against a table that stores name/value pair. Of course the
table has to be limited to the schema itself..

Would that be an acceptable work-around?

 Shridhar

Re: schema level variables

From
Paramveer.Singh@trilogy.com
Date:

 hi
Thank you for your feedback.
Actually, we are trying to move to postgres as a company, and not just move a particular project.
So we have to show the corporate hierarchy that this is not only good to move, but that it is feasible.
So we would like to rummage through as little of the legacy code as possible.
I am helping move one app for now (as a test case), but we would like to ensure smooth migration of the rest.
For this we are ready to contribute to postgres if necessary.
The gist is that it would be good if some of the features we use often could go into postgres itself.

Global variables (package/schema level) seem like a good feature addition to postgres. If someone could
give us some pointers on how to go about evaluating the feasibility of implementation, that would be very helpful.

thanks
Paramveer Singh


Shridhar Daithankar <shridhar@frodo.hserus.net>

15/09/2004 09:21 PM

       
        To:        Paramveer.Singh@trilogy.com
        cc:        "pgSQL General" <pgsql-general@postgresql.org>
        Subject:        Re: [GENERAL] schema level variables



On Wednesday 15 Sep 2004 6:12 pm, Paramveer.Singh@trilogy.com wrote:
> Hi!
> I am trying to port an oracle app to postgres, an I don't know what to do
> with package scope variables.
> I was looking up some documentation and it seems (IMHO) that schemas would
> be a nice place to put the variables in(as they already have functions,
> operators and types).
> Is this feasible? Is the dev team interested in doing this at some point in
> the future?

Can you replace the package level variable name with a function? The function
would run a select against a table that stores name/value pair. Of course the
table has to be limited to the schema itself..

Would that be an acceptable work-around?

Shridhar