Skip site navigation (1) Skip section navigation (2)

Re: PostgresSQL 8.4 - Data output - Newline

From: Josh Kupershmidt <schmiddy(at)gmail(dot)com>
To: "Paul (dot)" <larkybark123(at)hotmail(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: PostgresSQL 8.4 - Data output - Newline
Date: 2012-05-02 22:40:53
Message-ID: CAK3UJRG7BXJNSicZBisjYjxBCJ6f=z9+sdP7M4B1Too9V0tBvg@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-novice
On Wed, May 2, 2012 at 2:42 PM, Paul . <larkybark123(at)hotmail(dot)com> wrote:
> Made a SQL query that i run. However the data output is bit nasty to read
> since the lenght of it so i want break it into a new line to make it easier
> to read. I understood i could do this by using a newline command but the
> ones i found hasnt worked (they just create a new empty column).For
> instance: ' \n ' , E ' \n '.
>
> Anyone can help me out here what it is i need to use?
>
> To make it clear, say i have 2 columns only (VPIP and PFR). Now data output
> when i run the query is
> VPIP PFR
> 15 13
>
> I want to be able to make the data output to be
> VPIP
> 15
> PFR
> 13

How are you viewing this data? If it's with psql, look at the various
formatting options you can control with the \pset command:
  http://www.postgresql.org/docs/current/static/app-psql.html#APP-PSQL-EXAMPLES

Options you might be interested in are '\pset x'  or '\pset tuples_only'

Josh

In response to

pgsql-novice by date

Next:From: Lonni J FriedmanDate: 2012-05-02 23:51:54
Subject: JOIN producing duplicate results
Previous:From: Paul .Date: 2012-05-02 21:42:34
Subject: PostgresSQL 8.4 - Data output - Newline

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group