On Fri, Dec 12, 2003 at 01:46:48PM +0530, Shridhar Daithankar wrote:
>Rajesh wrote:
>
>>I had done this too.. But the same error :
>>
>>DBCURRENT=# select func_stockoutitems('01/10/2003', '05/10/2003', '');
>>server closed the connection unexpectedly
>> This probably means the server terminated abnormally
>> before or while processing the request.
>>The connection to the server was lost. Attempting reset: Failed.
>>!#
>>
>
>Most probably the backend has dumped the core. Can you send me relevant
>database schema, function body and postgresq version. I think this could be
>a date related bug but not sure.
>
>BTW, can you put numerous echo/prints in the SQL function and find out
>exactly where it is aborting?
Hello Shridhar,
I tried putting raise notice in the stored procedure but I think that
just when the stored procedure is called with those arguments the error
occurs and hence even the first line of the function is not executed.
See below for the starting part of the stored procedure function :
----------------------------------------------------------------------
CREATE FUNCTION func_stockoutitems(date, date, char) returns char as '
DECLARE
dfrom_date alias for $1;
dto_date alias for $2;
sdesc alias for $3;
cursor_record record;
indent_record record;
po_record record;
rcpo_record record;
nsrno integer;
nfirstentry integer;
npendingqty integer;
slocation_code char(1);
ssection_code char(3);
spart_number char(14);
BEGIN
raise notice ''i am in...'';
raise notice ''%'', dfrom_date;
raise notice ''%'', dto_date;
raise notice ''%'', sdesc;
----------------------------------------------------------------------
If I put raise notice in any other stored procedure than that goes in
the log and I can see the value of the variable in the log. Only in case
of the above function the error...
I am on Postgresql 7.2.1-2..
Thanks.
Warm Regards
--
Rajesh
-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
Free Linux Tutorials. Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
linux-india-help mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/linux-india-help