More probs with BLOBs

Поиск
Список
Период
Сортировка
От Neanderthelle Jones
Тема More probs with BLOBs
Дата
Msg-id Pine.LNX.4.64.1208151919190.3710@calypso.view.net.au
обсуждение исходный текст
Ответы Re: More probs with BLOBs
Re: More probs with BLOBs
Список pgsql-general
We are getting a strange thing happening if the lo_export(attr, path)
destination is a fifo.

First, in the normal case, there is output to the file but also
feedback to stdout (or somewhere, appearing on the VT screen) of the
number 1.

-----------
         1
(1 row)

Now, if the destination file is a fifo and a psql -c command is given
from the shell to lo_export(attr, '/path/to/fifo') we don't get that
feedback, but then a cat of the fifo to a normal file (cat fifo >
file) writes the BLOB content to the destination file but also sends

-----------
         1
(1 row)

(or just "1" with psql -t) to the console, apparently (not stderr).

So it seems to us that the lo_export output can't be piped (via a
named pipe) to another process that reads from the pipe and expects
the valid BLOB contents.

Beyond my understanding.  What is happening here, and can the echoing
to the fifo be avoided?  Ideas, anyone?

(PostgreSQL 9.1.2, Linux 2.6.29.)

Elle


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

Предыдущее
От: "Carl von Clausewitz"
Дата:
Сообщение: corrupted statistics file "pg_stat_tmp/pgstat.stat"
Следующее
От: Neanderthelle Jones
Дата:
Сообщение: Re: More probs with BLOBs