contrib/binarycopy

From: Lee Kindness <lkindness(at)csl(dot)co(dot)uk>
To: pgsql-patches(at)postgresql(dot)org
Cc: Lee Kindness <lkindness(at)csl(dot)co(dot)uk>
Subject: contrib/binarycopy
Date: 2003-08-05 13:16:16
Message-ID: 16175.44576.571267.169389@kelvin.csl.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

The attached tar archive and assosciated patch adds the binarycopy
module to contrib. I believe its functionality will be of interest to
many PostgreSQL users. From the readme:

This module contains routines to create a file suitable for reading by
the COPY BINARY command. It supports the creation of 2 file formats: if
POSTGRESQL_71 is defined when building then files compatible with
PostgreSQL 7.1 through to 7.3 will be created; if POSTGRESQL_74 is defined
then files compatible with PostgreSQL 7.4 and likely later versions will
be created.

The main purpose of this is to allow writing COPY BINARY files without
caring about the underlying format and any byte-swapping issues.

Currently most integer, float, text, varchar, bytea and timestamp
fields can be output. Support for other field types can be added on an
"as-needed" basis.

binarycopy.h includes documentation for each function, and these should
be fairly straight format to understand.

Regards, Lee Kindness.

Attachment Content-Type Size
contrib-binarycopy.tar.gz application/octet-stream 7.1 KB

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Lee Kindness 2003-08-05 13:16:21 COPY BINARY documentation
Previous Message Tom Lane 2003-08-04 21:00:21 Re: Patch for select() -> poll() in libpq