[Psycopg] Proposal: Adding "push" semantics to copy_from

Federico Di Gregorio fog at initd.org
Wed Dec 12 16:55:21 CET 2007


Il giorno mer, 12/12/2007 alle 15.31 +0000, Matt Goodall ha scritto:
> Purely in the interests of having a nicer API, wouldn't it be better
> to
> have a single method, say copy_from_streamed() or similar, that
> returns
> a write-only file-like object, i.e. an object with write() and close()
> methods.
> The file-like object can then handle the mechanics of opening, sending
> written data, and closing the data stream in a more natural and
> "Pythonic" way.

Yep. That's what we do for large objects. +1

-- 
Federico Di Gregorio                         http://people.initd.org/fog
Debian GNU/Linux Developer                                fog at debian.org
INIT.D Developer                                           fog at initd.org
                                   God is in the rain... -- Evey Hammond
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Questa =?ISO-8859-1?Q?=E8?= una parte del messaggio
	firmata digitalmente
Url : http://lists.initd.org/pipermail/psycopg/attachments/20071212/09a58b0b/attachment.pgp 


More information about the Psycopg mailing list