Re: Trigger output to file.

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: Claire McGovern <bramble_za(at)yahoo(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Trigger output to file.
Date: 2004-11-21 18:03:46
Message-ID: 20041121180346.GA21874@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On Tue, Nov 16, 2004 at 02:32:02AM -0800, Claire McGovern wrote:

> I'm looking for the syntax to get a trigger function
> written in PL/pgSQL to write to a text file. I want
> to be able to append to the file and not open as new
> each time I write to it.

As far as I know, the only built-in way to write files from PL/pgSQL
is with COPY, which needs a source table and overwrites rather than
appends. However, you could write a file-appending function in C
or in a procedural language like PL/Perl or PL/Python and call it
from PL/pgSQL.

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Ralf Kramer 2004-11-22 02:00:14 Perfomance in comparism
Previous Message Vishal Kashyap @ [SaiHertz] 2004-11-21 08:49:57 Re: [OT] apache auth with postgres?