pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jim C. Nasby <jnasby@pervasive.com>
To: Nalin Bakshi <nbakshi@bisil.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: Writing to a flat file using procedures
Date: Sat, 11 Feb 2006 18:10:41 -0600
Message-ID: <20060212001041.GV57845@pervasive.com> (raw)
In-Reply-To: <000801c62eca$8c2452a0$1801a8c0@nalin>
References: <000801c62eca$8c2452a0$1801a8c0@nalin>

On Sat, Feb 11, 2006 at 10:48:08AM +0530, Nalin Bakshi wrote:
> Hi!
>     My project requires me to fetch some data from a a table and write it into a flat file. How can I do this. Could you help?
> regards,

http://www.postgresql.org/docs/8.1/interactive/sql-copy.html
See also \copy on
http://www.postgresql.org/docs/8.1/interactive/app-psql.html , which
removes the need for the file to be writable by the back-end.
-- 
Jim C. Nasby, Sr. Engineering Consultant      jnasby@pervasive.com
Pervasive Software      http://pervasive.com    work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf       cell: 512-569-9461



view thread (2+ messages)

Message-ID: <20060212001041.GV57845@pervasive.com>
Permalink:  ../20060212001041.GV57845@pervasive.com/
Also on:    postgresql.org/message-id/20060212001041.GV57845@pervasive.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: jnasby@pervasive.com, nbakshi@bisil.com
  Subject: Re: Writing to a flat file using procedures
  In-Reply-To: <20060212001041.GV57845@pervasive.com>
  References: <000801c62eca$8c2452a0$1801a8c0@nalin> <20060212001041.GV57845@pervasive.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox