Received: from mailhost1.dircon.co.uk (mailhost1.dircon.co.uk [194.112.32.65]) by mail.postgresql.org (8.11.3/8.11.1) with ESMTP id f2JHRZk40062 for ; Mon, 19 Mar 2001 12:27:35 -0500 (EST) (envelope-from tim@paneris.co.uk) Received: from paneris.co.uk (paneris.co.uk [194.112.47.112]) by mailhost1.dircon.co.uk (8.9.3/8.9.3) with ESMTP id RAA53121 for ; Mon, 19 Mar 2001 17:27:32 GMT Message-ID: <3AB6417C.A4932BA4@paneris.co.uk> Date: Mon, 19 Mar 2001 17:27:24 +0000 From: Tim Pizey Organization: Context Computing X-Mailer: Mozilla 4.61 [en] (X11; I; Linux 2.2.12-20 i686) X-Accept-Language: en MIME-Version: 1.0 To: pgsql-sql@postgresql.org Subject: Invalid (null) int8, can't convert to float8 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Archive-Number: 200103/363 X-Sequence-Number: 2029 Hi, I have been lurking for a while and am very appreciative of the effort put in by the answers on this list, and for psql itself. I am using Postgres version 7.0.2 I have a table defined thus: CREATE TABLE "chapter" ( "id" int4 NOT NULL, "book" int4 NOT NULL, "sequence" int4 NOT NULL, "textid_old" int4, "indexdate" timestamp, "title" text NOT NULL, "path" text NOT NULL, "filename" text NOT NULL, "part" text, "lastencached" timestamp, "longtitle" text, "layout" int4, "messageboard" int4, "textid" int8 ); CREATE UNIQUE INDEX "chapter_id_index" on "chapter" using btree ( "id" "int4_ops" ); CREATE INDEX "chapter_book_index" on "chapter" using btree ( "book" "int4_ops" ); CREATE INDEX "chapter_sequence_index" on "chapter" using btree ( "sequence" "int4_ops" ); CREATE UNIQUE INDEX "chapter_textid_index" on "chapter" using btree ( "textid" "int8_ops" ); If there is a a record with a Null textid in the table then psql reports the error: Invalid (null) int8, can't convert to float8 to a query of the form select id from chapter where textid = 9057599501; It does seem as though the textid in the query needs to be large to produce the error. Can anyone suggest what is going on? I have, temporary, fixed the problem by eliminating all records with a null textid, but null is a sensible value, so it will re-occur. thanks in advance timp -- Member of http://www.paneris.org/