Re: error on Database insert

Поиск
Список
Период
Сортировка
От Joe Conway
Тема Re: error on Database insert
Дата
Msg-id 3FC6B449.1000606@joeconway.com
обсуждение исходный текст
Ответ на error on Database insert  ("Seader, Cameron" <CSeader@idahopower.com>)
Ответы Re: error on Database insert (off-topic)  (Greg Spiegelberg <gspiegelberg@cranel.com>)
Список pgsql-php
Seader, Cameron wrote:
> Bad int8 external representation "0x000000000002"
>
> what is this all about, why won't it insert this data into my bigint
> field in my Database?  What does it mean by external representation?
> Does anyone have any suggestions

You are apparently trying to insert a hex string "0x000000000002"
(notice it starts with '0x') into an int8 field -- don't do that.
Convert the hex to integer before inserting, or cast it, like so:

regression=# select x'000000000002'::int8;
  int8
------
     2
(1 row)


Joe


В списке pgsql-php по дате отправления:

Предыдущее
От: "Seader, Cameron"
Дата:
Сообщение: error on Database insert
Следующее
От: "Majolee InfoTech"
Дата:
Сообщение: plan CONTEXT: PL/pgSQL function Error