Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 5BD4F9FB3E1 for ; Wed, 11 Apr 2007 10:03:00 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 21908-05 for ; Wed, 11 Apr 2007 10:02:44 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.246]) by postgresql.org (Postfix) with ESMTP id 56FB49FB3E7 for ; Wed, 11 Apr 2007 10:02:49 -0300 (ADT) Received: by an-out-0708.google.com with SMTP id c24so185377ana for ; Wed, 11 Apr 2007 06:02:48 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type; b=pgXQ77vf6NXQEnBZQMevz9ACIH65YfUmobwEY0TS3DMSktgnM4Acs67lEZldiNJm1lm4ECH9OCwvAey6PPFDIw61yANZYzPvq0o2oiogyPTKg0oQKi8x07CHy2lTs2mZH2tStAmudaJuoDY//TT89wr51xLKiwxE/ZwAhvb67fE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type; b=COrcgIcQnQDDxfMQrSZChqs7VKsV5KBjZp+YHxo9F3/JYS/ErishBru71kPmC++l0tdTM/Zlb+EocfcoyPZql2hX17P4dRloT8ABd99ORAHnJTm/ieGblySfhiPurdOieCdaH2r0xjy78aolIatfN5c4By9gKaIsAgf36xVQrR8= Received: by 10.100.144.11 with SMTP id r11mr378085and.1176296568041; Wed, 11 Apr 2007 06:02:48 -0700 (PDT) Received: by 10.100.165.19 with HTTP; Wed, 11 Apr 2007 06:02:47 -0700 (PDT) Message-ID: <1d219a6f0704110602n5b9fe58dy34e05008b9bff0be@mail.gmail.com> Date: Wed, 11 Apr 2007 09:02:47 -0400 From: "Chris Hoover" To: "pgsql-admin@postgresql.org" Subject: Bytea question MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_6274_3002174.1176296567965" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200704/94 X-Sequence-Number: 25158 ------=_Part_6274_3002174.1176296567965 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Hopefully a quick question. If I store a file into a bytea field, is there anyway for postgres to read the contents of the file? Here is my scenario: Receive text file insert file into bytea field insert trigger fires - read file contents - post contents into production tables Is this at all possible, or am I going to need to store the original file and store/pass the file contents? Thanks, Chris ------=_Part_6274_3002174.1176296567965 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hopefully a quick question.

If I store a file into a bytea field, is there anyway for postgres to read the contents of the file?

Here is my scenario:

Receive text file
insert file into bytea field
insert trigger fires
  - read file contents
  - post contents into production tables

Is this at all possible, or am I going to need to store the original file and store/pass the file contents?


Thanks,

Chris
------=_Part_6274_3002174.1176296567965--