Re: Function error - Mailing list pgsql-general

From Albe Laurenz
Subject Re: Function error
Date
Msg-id A737B7A37273E048B164557ADEF4A58B537C0497@ntex2010a.host.magwien.gv.at
Whole thread Raw
In response to Re: Function error  (Sachin Srivastava <ssr.teleatlas@gmail.com>)
List pgsql-general
Sachin Srivastava wrote:
> In my function the problem is that global variables defined inside the function.
> These variables are visible to functions defined inside a function.
> If we move these inner functions to outside of the main function,
> they will lose the visibility of the global variables.
> So I think that's why we have to correct this functions rather then creating it as individual.

I see.
You'll have to rewrite the functions then, probably by passing the shared
values as parameters instead of having them in global variables.

> We have migrated our data from Oracle to Postgres through ORA2PG Tool
> after that we are getting this error for this function.

ora2pg cannot translate all PL/SQL code, you have to be prepared to rewrite
most nontrivial functions.

Yours,
Laurenz Albe

pgsql-general by date:

Previous
From: Steven Livingstone
Date:
Subject: Re: master slave failover - secondary slaves
Next
From: Tom Lane
Date:
Subject: Re: Why PG uses nested-loop join when no indexes are available?