Re: file I/O in plpgsql

From: Terry Lee Tucker <terry(at)esc1(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: file I/O in plpgsql
Date: 2006-04-29 14:23:54
Message-ID: 200604291023.54998.terry@esc1.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Friday 28 April 2006 03:47 pm, Jessica M Salmon <jmsalmon(at)fs(dot)fed(dot)us> thus
communicated:
-->
--> I'm trying to write out query results to a text file from within a
plpgsql --> function, but having trouble. Can anyone tell me if this is
possible? I'm --> trying to perform \o filename, then select, but it squawks
about no --> destination for the select results. Any pointers?
--> -Meghan
-->
-->
--> ---------------------------(end of broadcast)---------------------------
--> TIP 2: Don't 'kill -9' the postmaster
-->
You cannot do that with plpgsql. You can use Perl in "trusted" mode and pass
the query results to the Perl function which can write the output to a ffile.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Florian G. Pflug 2006-04-29 14:25:58 Re: file I/O in plpgsql
Previous Message Andreas Kretschmer 2006-04-29 14:21:45 Re: file I/O in plpgsql