

> -----Original Message-----
> From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
> Sent: 25 September 1999 23:58
> To: Peter Eisentraut
> Cc: pgsql-hackers@postgreSQL.org
> Subject: Re: [HACKERS] psql code to be obducted by alien (me) 

> Another part of psql that should be made as independent as possible
> is the support for \copy.  I recall a number of people asking in the
> past how they can read and write tables to files in their own apps.
> There's not that much code involved, but psql is such a mess that it's
> hard to point to a chunk of code they can borrow.

This is a common request for JDBC (which I'm targetting for 6.6)

> BTW, something closely related to \copy that's languishing on the TODO
> list is the ability to load the contents of a local file into a Large
> Object or write the data out again.  This would be the 
> equivalent of the
> server-side operations lo_import and lo_export, but reading 
> or writing a
> file in psql's environment instead of the backend's.  
> Basically a wrapper
> around lo_read/lo_write, not much to it but it needs done...

If I remember, one of the tests/examples for libpq does this (although
that code is commented out) - testlo & testlo2 ?

Peter

-- 
Peter Mount
Enterprise Support
Maidstone Borough Council
Any views stated are my own, and not those of Maidstone Borough Council.


Mon, 27 Sep 1999 09:07:18 +0100
Peter Mount <petermount@it.maidstone.gov.uk>
RE: [HACKERS] psql code to be obducted by alien (me) 