Binary mode copy in from stdin

Поиск
Список
Период
Сортировка
Искать

Binary mode copy in from stdin

От:
"Dann Corbit" <DCorbit@connx.com>
Дата:

We have (among other things) and ODBC/OLEDB/JDBC/.NET driver for PostgreSQL and we want to optimize fast mode insert/select behavior.

 

When we try to do a binary mode copy from standard input, we get an error message that we can’t do it.

 

How can we programmatically insert data using COPY from our own data stream without creating a file.

 

In our case, creating a file is just plain stupid.  There is never any reason for the data to hit the disk except at write time.

 

In case you were wondering, we already have the data in the correct binary format.

 

Why was it decided that binary mode is not allowed for stdin or stdout?  After all, programs can pipe to stdin and stdout.

 

Re: Binary mode copy in from stdin

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
"Dann Corbit"  writes:
> Why was it decided that binary mode is not allowed for stdin or stdout?

Works fine when using V3 frontend protocol.  The old protocol for it
isn't 8-bit-clean.
		regards, tom lane

FAQ