X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 6651853DFF for ; Wed, 13 Apr 2005 14:04:57 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 03839-09 for ; Wed, 13 Apr 2005 17:04:56 +0000 (GMT) Received: from mail.astudios.com (ns1.astudios.com [66.49.77.3]) by svr1.postgresql.org (Postfix) with ESMTP id A853E53698 for ; Wed, 13 Apr 2005 14:04:55 -0300 (ADT) thread-index: AcVAS0/RDUf7NwvUSoKeAQqKVPfD8A== Received: from [10.4.13.50] ([66.194.26.150]) by mail.astudios.com with Microsoft SMTPSVC(6.0.3790.1830); Wed, 13 Apr 2005 13:07:45 -0400 Message-ID: <425D5180.6020109@sermonaudio.com> Content-Class: urn:content-classes:message Importance: normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.1830 Date: Wed, 13 Apr 2005 13:06:08 -0400 From: "Chris Hoover" User-Agent: Mozilla Thunderbird 0.8 (X11/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 To: "PostgreSQL Admin" Subject: Best way to store files inside db Content-Type: text/plain; format=flowed; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 13 Apr 2005 17:07:45.0531 (UTC) FILETIME=[4FCA4CB0:01C5404B] X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200504/177 X-Sequence-Number: 17190 I am looking for some help/advice. We need to store some files inside postgres (at least it has been requested of us). What is the best way to do this? Right now, the files are all human readable text files, but that could change. I could store the contents of the human readable files in a text field, but I believe the requester would really like the real file to be stored as close to unmodified as possible. How can I do this? I am thinking to store unmodified, I'll have to use a bytea field. However, how do I tell the database to insert a file (say "c:\test.txt") into the table? Thanks for any help/pointer. Chris