X-Original-To: pgsql-general-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 794A1D1B503 for ; Tue, 18 Nov 2003 20:10:22 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 99196-10 for ; Tue, 18 Nov 2003 16:09:52 -0400 (AST) Received: from asmodeus.mcnaught.org (sp-260-1.net4.netcentrix.net [4.21.254.118]) by svr1.postgresql.org (Postfix) with ESMTP id C89D8D1B520 for ; Tue, 18 Nov 2003 16:09:50 -0400 (AST) Received: from doug by asmodeus.mcnaught.org with local (Exim 3.36 #1) id 1AMCAT-0003Sq-00; Tue, 18 Nov 2003 15:09:45 -0500 To: Karsten Hilbert Cc: PgSQL General ML Subject: Re: uploading files References: <1069164075.986.239.camel@bbking.uio.no> <20031118142919.GI4953@libertyrms.info> <1069180780.2769.91.camel@haggis.homelan> <019301c3ae07$d714e220$0700a8c0@trogdor> <87llqdqy37.fsf@asmodeus.mcnaught.org> <20031118205057.K606@hermes.hilbert.loc> From: Doug McNaught Date: 18 Nov 2003 15:09:45 -0500 In-Reply-To: Karsten Hilbert's message of "Tue, 18 Nov 2003 20:50:58 +0100" Message-ID: <87fzglqvzq.fsf@asmodeus.mcnaught.org> Lines: 18 X-Mailer: Gnus v5.7/Emacs 20.7 X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200311/940 X-Sequence-Number: 52590 Karsten Hilbert writes: > > Depends on whether you need "random access" to the contents. You can > > lo_seek() inside a large object and retrieve parts of the data with > > lo_read(), while 'text' and 'bytea' currently require fetching the > > whole file. > Not so unless I misunderstand. We use substr() on bytea for > chunking access to large files on OSs with inferior TCP/IP buffer > implementations. That's probably suboptimal performance-wise, > though. I think the field will still be competely loaded into memory on the server side though, while LOs are stored in "chunks" and can theoretically be streamed to the client. I'm not really a definitive authority, though... -Doug