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 751ABD1B8B6 for ; Tue, 18 Nov 2003 19:25:34 +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 96401-03 for ; Tue, 18 Nov 2003 15:25:04 -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 64DE2D1BB5E for ; Tue, 18 Nov 2003 15:24:47 -0400 (AST) Received: from doug by asmodeus.mcnaught.org with local (Exim 3.36 #1) id 1AMBSe-0003KP-00; Tue, 18 Nov 2003 14:24:28 -0500 To: "Rick Gigger" 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> From: Doug McNaught Date: 18 Nov 2003 14:24:28 -0500 In-Reply-To: "Rick Gigger"'s message of "Tue, 18 Nov 2003 12:11:53 -0700" Message-ID: <87llqdqy37.fsf@asmodeus.mcnaught.org> Lines: 12 X-Mailer: Gnus v5.7/Emacs 20.7 X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200311/935 X-Sequence-Number: 52585 "Rick Gigger" writes: > What is the best method for storing files in postgres? Is it better to use > the large object functions or to just encode the data and store it in a > regular text or data field? 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 field. -Doug