problem with fe/be protocol and large objects

Поиск
Список
Период
Сортировка
От Eric Marsden
Тема problem with fe/be protocol and large objects
Дата
Msg-id wzik85wngmc.fsf@mail.dotcom.fr
обсуждение исходный текст
Ответы Re: problem with fe/be protocol and large objects  (Denis Perchine <dyp@perchine.com>)
Re: problem with fe/be protocol and large objects  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
I am trying to debug my socket-level interface to the backend, which
implements the 6.4 protocol. It works for general queries, but I have
a problem with large objects.

lo_create and lo_unlink seem to work OK; I get an oid which looks ok
and there is a corresponding xinv??? file in the base/ directory.
lo_open returns 0 as a file descriptor. However, following up with one
of the other lo functions which take descriptor arguments (such as
lo_write or lo_tell) fails with
  ERROR:  lo_tell: invalid large object descriptor (0)

Looking at be-fsstubs.c it seems that this arises when cookies[fd] is
NULL. I don't know what this might come from: the lo_tell is sent
right after the lo_open, on the same connection.

Running the sample lo program in C works, so I suppose the problem
must come from the bytes I'm sending. Any ideas what could cause this? 


PostgreSQL 7.0.3 on sparc-sun-solaris2.5.1, compiled by gcc 2.95.2

-- 
Eric Marsden                          <URL:http://www.laas.fr/~emarsden/>


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

Предыдущее
От: Patrick Welche
Дата:
Сообщение: Re: Internationalized error messages
Следующее
От: Alfred Perlstein
Дата:
Сообщение: Re: Performance monitor signal handler