Re: Creating Text Files from Tables

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: "A(dot) Kretschmer" <andreas(dot)kretschmer(at)schollglas(dot)com>, pgsql-novice(at)postgresql(dot)org
Subject: Re: Creating Text Files from Tables
Date: 2006-02-11 06:58:17
Message-ID: 20060211065817.GA20066@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On Fri, Feb 10, 2006 at 03:17:31PM +0100, A. Kretschmer wrote:
> am 10.02.2006, um 7:06:52 -0600 mailte Warren Murray folgendes:
> > This maybe be on a more complex side, but I'm a novice to say the least, how
> > can I export a text delimited file from Postgresql. The file will be
> > transferred into a specific directory for use with another system. text
> > file row sample: 396,"bigshoes.blue.7"
> >
> > My last question is how can I create a series of fixed-width text files from
> > tables and/or queries in a Postgresql database?
>
> You can use untrusted languages such as plperlu for this.

Depending on your formatting requirements, COPY or psql's \copy or
\o commands might work, or even running a psql one-liner from the
command line and redirecting the output. See the psql documentation
for formatting options.

--
Michael Fuhr

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message ccrupper 2006-02-12 06:01:28 Can't Find Any Tables with DatabaseMetaData.getTables()
Previous Message John DeSoi 2006-02-10 15:06:58 Re: Creating Text Files from Tables