From: | Federico Di Gregorio <federico(dot)digregorio(at)dndg(dot)it> |
---|---|
To: | psycopg(at)postgresql(dot)org |
Subject: | Re: psycopg2 not using appropriate type? |
Date: | 2011-03-11 13:19:26 |
Message-ID: | 4D7A215E.3040807@dndg.it |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | psycopg |
On 11/03/11 00:04, Wells Oliver wrote:
> It seems when I use callproc(), psycopg2 isn't properly casting strings
> as text or character varying.
>
> For example:
>
> values = [pid, 4, 4, 'bureau pitcher ama', 0, 130, row['report_dte'],
> row['report_dte'], 1, 1, 1, None, None, 'published', row['report_dte']]
> cur.callproc('header', values)
>
> Yields:
>
> psycopg2.ProgrammingError: function
> basetek_scouting.insert_report_header(integer, integer, integer,
> unknown, integer, integer, unknown, unknown, integer, integer, integer,
> unknown, unknown, unknown, unknown) does not exist
> LINE 1: SELECT * FROM header(509952,4.
>
> First, the "bureau pitcher ama" is unknown instead of text/character,
> and row["report_dte"] are all unknown, where they are date types in the
> database, and datetime.date objects in python.
>
> Any idea? Using python 2.6.5.
Can you show us the function signature?
--
Federico Di Gregorio federico(dot)digregorio(at)dndg(dot)it
Studio Associato Di Nunzio e Di Gregorio http://dndg.it
Purtroppo i creazionisti non si sono ancora estinti. -- vodka
From | Date | Subject | |
---|---|---|---|
Next Message | P. Christeas | 2011-03-13 22:21:14 | Build error: math library not linked |
Previous Message | Wells Oliver | 2011-03-10 23:04:12 | psycopg2 not using appropriate type? |