pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Joe Conway <mail@joeconway.com>
To: Seader, Cameron <CSeader@idahopower.com>
Cc: pgsql-php@postgresql.org
Subject: Re: error on Database insert
Date: Thu, 27 Nov 2003 18:34:49 -0800
Message-ID: <3FC6B449.1000606@joeconway.com> (raw)
In-Reply-To: <71B8A8BEC516CF46835CA629156CF21163F6A9@bedford.idacorp.local>
References: <71B8A8BEC516CF46835CA629156CF21163F6A9@bedford.idacorp.local>

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




view thread (2+ messages)

Message-ID: <3FC6B449.1000606@joeconway.com>
Permalink:  ../3FC6B449.1000606@joeconway.com/
Also on:    postgresql.org/message-id/3FC6B449.1000606@joeconway.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-php@postgresql.org
  Cc: mail@joeconway.com, CSeader@idahopower.com
  Subject: Re: error on Database insert
  In-Reply-To: <3FC6B449.1000606@joeconway.com>
  References: <71B8A8BEC516CF46835CA629156CF21163F6A9@bedford.idacorp.local> <3FC6B449.1000606@joeconway.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox