Re: A cronjob for copying a table from Oracle

Поиск
Список
Период
Сортировка
От Alexander Farber
Тема Re: A cronjob for copying a table from Oracle
Дата
Msg-id AANLkTi=SjuuNriSMkuxKvrPrPnyvJ5XpOSsTiGcGtPqp@mail.gmail.com
обсуждение исходный текст
Ответ на Re: A cronjob for copying a table from Oracle  (Adrian Klaver <adrian.klaver@gmail.com>)
Список 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 по дате отправления:

Предыдущее
От: Merlin Moncure
Дата:
Сообщение: Re: Extended query protocol and exact types matches.
Следующее
От: "Henrique de Lima Trindade"
Дата:
Сообщение: Using regexp_replace to remove small words