Re: A cronjob for copying a table from Oracle - Mailing list pgsql-general

From Alexander Farber
Subject Re: A cronjob for copying a table from Oracle
Date
Msg-id AANLkTi=SjuuNriSMkuxKvrPrPnyvJ5XpOSsTiGcGtPqp@mail.gmail.com
Whole thread Raw
In response to Re: A cronjob for copying a table from Oracle  (Adrian Klaver <adrian.klaver@gmail.com>)
List pgsql-general
On Fri, Dec 10, 2010 at 6:15 PM, Adrian Klaver <adrian.klaver@gmail.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

pgsql-general by date:

Previous
From: Merlin Moncure
Date:
Subject: Re: Extended query protocol and exact types matches.
Next
From: "Henrique de Lima Trindade"
Date:
Subject: Using regexp_replace to remove small words