Unix Technical Forum

Re: Creating Text Files from Tables

This is a discussion on Re: Creating Text Files from Tables within the pgsql Novice forums, part of the PostgreSQL category; --> am 10.02.2006, um 7:06:52 -0600 mailte Warren Murray folgendes: > This maybe be on a more complex side, but ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Novice

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-17-2008, 10:35 PM
A. Kretschmer
 
Posts: n/a
Default Re: Creating Text Files from Tables

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.


HTH, Andreas
--
Andreas Kretschmer (Kontakt: siehe Header)
Heynitz: 035242/47215, D1: 0160/7141639
GnuPG-ID 0x3FFF606C http://wwwkeys.de.pgp.net
=== Schollglas Unternehmensgruppe ===

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-17-2008, 10:35 PM
Michael Fuhr
 
Posts: n/a
Default Re: Creating Text Files from Tables

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

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 03:58 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com