Re: [GENERAL] Function error

2016-01-14 Thread Albe Laurenz
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 vari

Re: [GENERAL] Function error

2016-01-13 Thread David G. Johnston
On Wed, Jan 13, 2016 at 10:06 PM, Sachin Srivastava wrote: > Dear Albe, > > Thanks for your support !!! > > In my function the problem is that global variables defined inside the > function. These variables are visible to functions defined inside a > function. > ​Holy Crap...PostgreSQL functions

Re: [GENERAL] Function error

2016-01-13 Thread Sachin Srivastava
Dear Albe, Thanks for your support !!! 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

Re: [GENERAL] Function error

2016-01-13 Thread Adrian Klaver
On 01/13/2016 01:18 AM, Sachin Srivastava wrote: > > Dear Team, > > I am getting the below error for function, please see the bold line in > "Function code", please suggest what I will do to correct this code. > > --- > > ERROR: syntax error at or near "*" > LINE 35: SEL

Re: [GENERAL] Function error

2016-01-13 Thread Albe Laurenz
Sachin Srivastava wrote: > I am getting the below error for function, please see the bold line in > "Function code", please suggest > what I will do to correct this code. > > --- > > ERROR: syntax error at or near "*" > LINE 35: SELECT * from logError(msg text) is >

Re: [GENERAL] Function error

2016-01-08 Thread Sachin Srivastava
Thanks Pavel for your help !!! On Fri, Jan 8, 2016 at 3:28 PM, Pavel Stehule wrote: > > > 2016-01-08 10:52 GMT+01:00 Sachin Srivastava : > >> Because I have migrated the database from Oracle to Postgres through >> ORA2PG. >> >> So how I will change it, please suggest. >> > > > http://stackoverfl

Re: [GENERAL] Function error

2016-01-08 Thread Pavel Stehule
2016-01-08 10:52 GMT+01:00 Sachin Srivastava : > Because I have migrated the database from Oracle to Postgres through > ORA2PG. > > So how I will change it, please suggest. > http://stackoverflow.com/questions/2269156/converting-from-oracle-join-to-postgres-join > On Fri, Jan 8, 2016 at 2:54 P

Re: [GENERAL] Function error

2016-01-08 Thread Sachin Srivastava
Because I have migrated the database from Oracle to Postgres through ORA2PG. So how I will change it, please suggest. On Fri, Jan 8, 2016 at 2:54 PM, Pavel Stehule wrote: > > > 2016-01-08 10:08 GMT+01:00 Sachin Srivastava : > >> Hi, >> >> I am also getting "syntax error for below function (just

Re: [GENERAL] Function error

2016-01-08 Thread Pavel Stehule
2016-01-08 10:08 GMT+01:00 Sachin Srivastava : > Hi, > > I am also getting "syntax error for below function (just some lines of > function where I am getting syntax error), please suggest why? > Using Oracle's outer join syntax, not ANSI SQL syntax Regards Pavel > > > -

Re: [GENERAL] Function error

2016-01-08 Thread Sachin Srivastava
Hi, I am also getting "syntax error for below function (just some lines of function where I am getting syntax error), please suggest why? -- Image path AND mk1.subscriber_id(+)=pcat_catalog_item.subscriber_id AND cs1.subscriber_id(+)=pcat_catalog_item.subscr

Re: [GENERAL] Function error

2016-01-08 Thread Pavel Stehule
Hi 2016-01-08 8:59 GMT+01:00 Sachin Srivastava : > Hi, > > Also there is any command to see the invalid and valid function in > postgres database. > No, Postgres is not a Oracle. All functions in database are valid. But it means some different than in Oracle. That's "all embedded SQL are syntact

Re: [GENERAL] Function error

2016-01-08 Thread Sachin Srivastava
Hi, Also there is any command to see the invalid and valid function in postgres database. Regards, SS On Fri, Jan 8, 2016 at 1:18 PM, Sachin Srivastava wrote: > Thanks Charles !!! > > On Fri, Jan 8, 2016 at 1:15 PM, Sachin Srivastava > wrote: > >> Thanks Pavel !!! >> >> On Fri, Jan 8, 2016 at

Re: [GENERAL] Function error

2016-01-07 Thread Sachin Srivastava
Thanks Charles !!! On Fri, Jan 8, 2016 at 1:15 PM, Sachin Srivastava wrote: > Thanks Pavel !!! > > On Fri, Jan 8, 2016 at 1:05 PM, Pavel Stehule > wrote: > >> Hi >> >> >> >> 2016-01-08 8:24 GMT+01:00 Sachin Srivastava : >> >>> Dear Concern, >>> >>> >>> >>> I am creating below function *“create_

Re: [GENERAL] Function error

2016-01-07 Thread Sachin Srivastava
Thanks Pavel !!! On Fri, Jan 8, 2016 at 1:05 PM, Pavel Stehule wrote: > Hi > > > > 2016-01-08 8:24 GMT+01:00 Sachin Srivastava : > >> Dear Concern, >> >> >> >> I am creating below function *“create_catexp_ss_master()” *and getting >> error as below, I have already created dependent function firs

Re: [GENERAL] Function error

2016-01-07 Thread Charles Clavadetscher
Hello If I understand you correctly you have two functions create_catexp_ss_1 and create_catexp_ss_2 that you then call from create_catexp_master. If so then you probably need to change the call to them: > -- Exposure for single supplier without category filtering >

Re: [GENERAL] Function error

2016-01-07 Thread Pavel Stehule
Hi 2016-01-08 8:24 GMT+01:00 Sachin Srivastava : > Dear Concern, > > > > I am creating below function *“create_catexp_ss_master()” *and getting > error as below, I have already created dependent function firstly > successfully *(“create_catexp_ss_1” and “create_catexp_ss_2”) *but still > gettin