Binary mode copy in from stdin

From: "Dann Corbit" <DCorbit(at)connx(dot)com>
To: <pgsql-hackers(at)postgresql(dot)org>
Subject: Binary mode copy in from stdin
Date: 2007-06-08 21:38:41
Message-ID: D425483C2C5C9F49B5B7A41F89441547010006F7@postal.corporate.connx.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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.

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jim C. Nasby 2007-06-08 21:44:27 Re: Autovacuum launcher doesn't notice death of postmaster immediately
Previous Message Matthew T. O'Connor 2007-06-08 20:47:08 Re: COPYable logs status