Re: How to debug this crash? - Mailing list pgsql-general

From Jorge Godoy
Subject Re: How to debug this crash?
Date
Msg-id 87bqjf57ow.fsf@gmail.com
Whole thread Raw
In response to Re: How to debug this crash?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
Tom Lane <tgl@sss.pgh.pa.us> writes:

> What python version?  (Hint: pre-8.2 plpython is known not to work
> with python 2.5)

This is more to confirm what I've found in practice and couldn't find at the
online docs for 8.2: is it possible to use output variables to write stored
procedures in plpythonu or am I restricted to functions only?

For a function where I declared an output parameter I'm getting the following
message:



================================================================================
neo=# select neolab.f_v_formata_valor_resultado(3.23456, 53);
ERRO:  proargnames must have the same number of elements as the function has arguments
neo=#
================================================================================



The code to this function was provided on my first message, the signature of
it is:




================================================================================
neo=# \df neolab.f_v_formata_valor_resultado
                                                         List of functions
 Schema |            Name             | Result data type |                           Argument data types
            

--------+-----------------------------+------------------+--------------------------------------------------------------------------
 neolab | f_v_formata_valor_resultado | text             | p_resultado double precision, p_analise_id integer, OUT
o_resultadotext 
(1 row)

neo=#
================================================================================


This worked with Python 2.4 and PG 8.1.4 / 8.1.5.



I'm getting this error with PostgreSQL 8.2.3 and Python 2.5.  Is it a bug?  It
is correct behavior?  (If this is correct behavior it would be very nice to
get the 'out' parameter as it was before and also being able to reference
variables directly without resorting to using the args array...)


TIA,
--
Jorge Godoy      <jgodoy@gmail.com>

pgsql-general by date:

Previous
From: "John Jawed"
Date:
Subject: Re: Difference between UNIQUE constraint vs index
Next
From: "Henry B. Hotz"
Date:
Subject: Re: [HACKERS] 5 Weeks till feature freeze or (do you know where your patch is?)