insertiing an image file (blob) into postres...

Started by Prabu Subrotoover 21 years ago2 messagesgeneral
Jump to latest
#1Prabu Subroto
prabu_subroto@yahoo.com

Dear my friends....

I created a column with datatype bytea. The name of
the column is emoicon

I did like this:

kv=# insert into salesreport (salesid, custid,
emoicon) values('13', '4531',
lo_import('/localhome/patrixlinux/arsip/proyek/qt/kv/client/images/1.png'));
ERROR: column "emoicon" is of type bytea but
expression is of type oid
HINT: You will need to rewrite or cast the
expression.
kv=#

but comes error. What is my mistake?

Please tell me....

Thank you very much in advance.

__________________________________
Do you Yahoo!?
Yahoo! Mail is new and improved - Check it out!
http://promotions.yahoo.com/new_mail

#2Daniel Schuchardt
daniel_schuchardt@web.de
In reply to: Prabu Subroto (#1)
Re: insertiing an image file (blob) into postres...

Prabu Subroto schrieb:

kv=# insert into salesreport (salesid, custid,
emoicon) values('13', '4531',
lo_import('/localhome/patrixlinux/arsip/proyek/qt/kv/client/images/1.png'));
ERROR: column "emoicon" is of type bytea but
expression is of type oid

try to make a oid type column and repeat this.

CREATE TABLE test(
...
emoicon oid,
...
);

Daniel