Re: How to debug this crash?

From: Jorge Godoy <jgodoy(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: How to debug this crash?
Date: 2007-02-28 02:37:03
Message-ID: 87bqjf57ow.fsf@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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_resultado text
(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(at)gmail(dot)com>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Henry B. Hotz 2007-02-28 05:23:09 Re: [HACKERS] 5 Weeks till feature freeze or (do you know where your patch is?)
Previous Message John Jawed 2007-02-28 01:19:57 Re: Difference between UNIQUE constraint vs index