Inserting a BLOB

Поиск
Список
Период
Сортировка
От Barry Baldwin
Тема Inserting a BLOB
Дата
Msg-id 319A9588FB5ED2119FAC00A0C912E3292786D7@INDYMEEXCH
обсуждение исходный текст
Список pgsql-interfaces
Hi all,

I'm trying to use BLOB's in a database that I'm creating.  This database
will be connected to a Delphi app via ODBC.
I've create a data type lo like the ODBC faq says to do.
create type lo (  internallength=4, externallength=10,  input=int4in, output=int4out,  default=' ', passedbyvalue
);

and I've created a table that uses the above type lo.

Now I would like to manually enter data into the database
through psql.  How do I insert an image file?

I've tried : Insert into picture_tbl (pic_id, image) values(1,
lo_import('/home/images/pic_1.jpg'));

This doesn't work because lo_import returns a type of oid.  I must be
missing something very obvious.

Any help or suggestions would be very appreciated,

TIA,

Barry



В списке pgsql-interfaces по дате отправления:

Предыдущее
От: Robert Hiltibidal
Дата:
Сообщение: Special Characters
Следующее
От: Michael Meskes
Дата:
Сообщение: Re: [INTERFACES] Setup of PGAdmin