Inserting large objects

Поиск
Список
Период
Сортировка
От Nisha Joseph
Тема Inserting large objects
Дата
Msg-id F736TTVjrTwgzxEMKby00000015@hotmail.com
обсуждение исходный текст
Список pgsql-general
Hi there,

I have a problem with the windows 32 odbc driver for postgres.

I have written an application in visual C++ 6 that can read/write in any
table on the postgreSql server through ODBC, But now I want to put a
picture (large object) in the database. The odbc driver FAQ said I had to
create a new type, called lo, which I did, but that still get's me nowhere.
create type lo (
   internallength=4,
   externallength=10,
   input=int4in,
   output=int4out,
   default='',
   passedbyvalue
);

create table photographs(
   id integer,
   data lo,
   name varchar(30),
);


How can I read a picture from the database? Can I just use an SQL query
and select the picture from the database, or do I have to use some of
the functions in the drivers DLL?

The same thing goes for writing an image to the database. How do I insert
the pictures into the photgraphs table?


I have read that the lo datatype is mapped to LONGVARBINARY. Does that
mean all the data is stored in the format LONGVARBINARY or just the oid?

thanx







_________________________________________________________________
Use MSN Messenger to send music and pics to your friends
http://messenger.msn.co.uk


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

Предыдущее
От: "Mark Cave-Ayland"
Дата:
Сообщение: Ref to last INSERT on a table without OIDs?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Using RSYNC for replication?