Re: Bytea question

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Chris Hoover <revoohc(at)gmail(dot)com>
Cc: "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Bytea question
Date: 2007-04-11 13:22:58
Message-ID: 20070411132258.GF4896@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Chris Hoover escribió:
> No, I need to store the entire file as received into the database.

Then you original question does not make any sense to me, because if you
pass the entire file content, why would Postgres *not* be able to read
it?

> On 4/11/07, Alvaro Herrera <alvherre(at)commandprompt(dot)com> wrote:
> >
> >Chris Hoover escribió:
> >> 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?
> >
> >When you say "store a file", do you mean "store a filename"?
> >
> >> 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?

--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Chris Hoover 2007-04-11 13:32:31 Re: Bytea question
Previous Message Chris Hoover 2007-04-11 13:17:56 Re: Bytea question