From: | Alexander Farber <alexander(dot)farber(at)gmail(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: A cronjob for copying a table from Oracle |
Date: | 2010-12-10 18:13:02 |
Message-ID: | AANLkTi=SjuuNriSMkuxKvrPrPnyvJ5XpOSsTiGcGtPqp@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Fri, Dec 10, 2010 at 6:15 PM, Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com> wrote:
> On Friday 10 December 2010 8:51:19 am Alexander Farber wrote:
>> SQLSTATE[22001]: String data, right truncated: 7 ERROR: value too
>> long for type character varying(16)
>>
>> CONTEXT: SQL statement "update qtrack set APPSVERSION = $1 ,
>> BETA_PROG = $2 , CATEGORY = $3 , CATINFO = $4 , DETAILS = $5 ,
>> DEVINFO = $6 , EMAIL = $7 , EMAILID = $8 , FORMFACTOR = $9 , ID =
>> $10 , IMEI = $11 , NAME = $12 , OSVERSION = $13 , PIN = $14 ,
>> QDATETIME = $15 , COPIED = current_timestamp where ID = $10 "
>> PL/pgSQL function "qtrack_upsert" line 2 at SQL statement
>
>
> Looks like you got your EMAIL and EMAILID reversed. In your argument list
> EMAILID is 7th but it is getting the 8th variable, the reverse for EMAIL.
That was it Adrian, thank you so much! It was reversed in my
Oracle's select and thus the PostgreSQL's upsert was failing.
I was looking too many times at that spot, so I stopped really reading it.
Dmitiry, $7 and $8 etc. is probably what plpgsql
substitutes for _EMAIL and _EMAILID internally
Regards
Alex
From | Date | Subject | |
---|---|---|---|
Next Message | Dmitriy Igrishin | 2010-12-10 18:26:11 | Re: Extended query protocol and exact types matches. |
Previous Message | Merlin Moncure | 2010-12-10 18:05:44 | Re: Extended query protocol and exact types matches. |