Re: need some help with pl-pgsql - Mailing list pgsql-general

From Adrian Klaver
Subject Re: need some help with pl-pgsql
Date
Msg-id 200812240816.03592.aklaver@comcast.net
Whole thread Raw
In response to Re: need some help with pl-pgsql  (justin <justin@emproshunts.com>)
List pgsql-general
On Tuesday 23 December 2008 9:57:01 pm justin wrote:

>
> I have taken your idea and made sure all the variables all appear the
> same and add raise notice for each portion of the command that is failing.
>
> -------------------------------------------------------------
> NOTICE:  _wipvalue: <NULL>
> CONTEXT:  SQL statement "SELECT postProduction(  $1 ,  $2 , FALSE,
> false, 0, Current_User, Current_User,  $3  )"
> PL/pgSQL function "forceclosewo" line 66 at SQL statement
>
> NOTICE:  _wipqty: 1.00000000
> CONTEXT:  SQL statement "SELECT postProduction(  $1 ,  $2 , FALSE,
> false, 0, Current_User, Current_User,  $3  )"
> PL/pgSQL function "forceclosewo" line 66 at SQL statement
>
> NOTICE:  _wipvalue/_wipqty= <NULL>
> CONTEXT:  SQL statement "SELECT postProduction(  $1 ,  $2 , FALSE,
> false, 0, Current_User, Current_User,  $3  )"
> PL/pgSQL function "forceclosewo" line 66 at SQL statement
>
> NOTICE:  pwoid: 6916
> CONTEXT:  SQL statement "SELECT postProduction(  $1 ,  $2 , FALSE,
> false, 0, Current_User, Current_User,  $3  )"
> PL/pgSQL function "forceclosewo" line 66 at SQL statement
>
> NOTICE:  TotalCost: <NULL>
> CONTEXT:  SQL statement "SELECT postProduction(  $1 ,  $2 , FALSE,
> false, 0, Current_User, Current_User,  $3  )"
> PL/pgSQL function "forceclosewo" line 66 at SQL statement
>
> ----------------------------------------------------------------
>
> So it appears that something is causing _wipvalue to get set to NULL
> somewhere else in the code.  Now when running the failing select
> statement manually  works is because the modified record is still not
> committed yet and its reading the unmodified record.
>
> the ForceCloseWo() calls several other functions before PostProduction()
> that beat on the header record a few times.  ForceCloseWo does extactly
> what it sounds like closes Work Orders forcible  based on default values
> set in the database.  I'm betting this record has some flaky setting
> somewhere thats either in the posting of raw material or  labor
> operations.
>
>
> its late i'm going to bed fight this again later this morning.
>
> thanks

Looks like you are narrowing it down. Good luck on that and if you need
another set of eyes don't hesitate to post.

--
Adrian Klaver
aklaver@comcast.net

pgsql-general by date:

Previous
From: "Jonah H. Harris"
Date:
Subject: Re: pl/proxy and sequence generation
Next
From: justin
Date:
Subject: Re: need some help with pl-pgsql