Re: Query output into a space delimited/location sensitive file

From: "Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com>
To: "Bruce Momjian" <bruce(at)momjian(dot)us>
Cc: "Ubence Quevedo" <r0d3nt(at)pacbell(dot)net>, pgsql-general(at)postgresql(dot)org
Subject: Re: Query output into a space delimited/location sensitive file
Date: 2008-02-17 00:12:38
Message-ID: dcc563d10802161612k6dfe256cxe40058deec14aa5e@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Feb 16, 2008 5:29 PM, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
> Ubence Quevedo wrote:
> > What would the command be to have a query result be put into a
> > location/space sensitive file [position 1 through 5 would be one thing
> > where position 6 through 10 would be the next field, 11 through 16
> > another, etc]? Is this even possible with Postgres?
>
> Not possible --- many data types are of variable length.

I think the OP was just looking at processing fixed with records into
pgsql. If that's the case you can make a load table with one text
field and select into from it with something like substring(field,1,5)
etc...

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ubence Quevedo 2008-02-17 01:19:28 Re: Query output into a space delimited/location sensitive file
Previous Message Bruce Momjian 2008-02-16 23:29:36 Re: Query output into a space delimited/location sensitive file