Re: blob load errors - Mailing list pgsql-jdbc

From jonerf1
Subject Re: blob load errors
Date
Msg-id 3DACD044.2060202@qwest.net
Whole thread Raw
In response to blob load errors  ("jonerf1" <jonesrf1@qwest.net>)
List pgsql-jdbc
Tom Lane wrote:

>"jonerf1" <jonesrf1@qwest.net> writes:
>
>>DEBUG:  query: INSERT INTO images
>>HERE NEXT LINE SHORTENED UP
>>VALUES('doss','\\377WPC^\\012\\000\\000\\001\\012\\002\\001\\000\\000\\000\\002\\005\\0\\000\\324')
>>
>>ERROR:  pg_atoi: error in "doss": can't parse "doss"
>>
>
>It'd appear to me that the problem is the lack of a column name list
>in this version of the INSERT command.  The command is evidently
>attempting to insert 'doss' into some integer column.  The version
>that you said worked called out the two column names explicitly
>(and, I infer, skipped at least one integer column).
>
>You should be trying to figure out why the column name list is
>missing.
>
>            regards, tom lane
>
>
Thanks for your reply. The following statement fails as described. It
 works on my machine and doesnt work on his. Doss is the file name; it
 is in the right place, a text field; the next '\\377wpc is data from
the file which should be an oid processed as a stream.
DEBUG:  query: INSERT INTO images(imgname, imgoid)
VALUES('doss','\\377WPC^\\012\\000\\000\

The following line show a successful upload; the second value is the oid
of the image loaded to postgresql
DEBUG:  query: INSERT INTO images(imgname, imgoid) VALUES('cap.sxw',16676)

The other machine can load strings into pgsql, just not bytea blobs.

TIA
rfjones


pgsql-jdbc by date:

Previous
From: Aaron Mulder
Date:
Subject: Re: Support for javax.sql.DataSource ..
Next
From: "jonerf1"
Date:
Subject: Re: blob load errors