Re: error on Database insert

From: Joe Conway <mail(at)joeconway(dot)com>
To: "Seader, Cameron" <CSeader(at)idahopower(dot)com>
Cc: pgsql-php(at)postgresql(dot)org
Subject: Re: error on Database insert
Date: 2003-11-28 02:34:49
Message-ID: 3FC6B449.1000606@joeconway.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-php by date

  From Date Subject
Next Message Majolee InfoTech 2003-11-28 08:22:09 plan CONTEXT: PL/pgSQL function Error
Previous Message Seader, Cameron 2003-11-27 19:16:16 error on Database insert