Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7602445
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T23:24:50+00:00 2026-05-30T23:24:50+00:00

I am using PostgreSQL 8.4 on Ubuntu. I have a table with columns c1

  • 0

I am using PostgreSQL 8.4 on Ubuntu. I have a table with columns c1 through cN. The columns are wide enough that selecting all columns causes a row of query results to wrap multiple times. Consequently, the output is hard to read.

When the query results constitute just a few rows, it would be convenient if I could view the query results such that each column of each row is on a separate line, e.g.

 c1: <value of row 1's c1>
 c2: <value of row 1's c1>
 ...
 cN: <value of row 1's cN>
 ---- some kind of delimiter ----
 c1: <value of row 2's c1>
 etc.

I am running these queries on a server where I would prefer not to install any additional software. Is there a psql setting that will let me do something like that?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T23:24:51+00:00Added an answer on May 30, 2026 at 11:24 pm

    I just needed to spend more time staring at the documentation. This command:

    \x on
    

    will do exactly what I wanted. Here is some sample output:

    select * from dda where u_id=24 and dda_is_deleted='f';
    -[ RECORD 1 ]------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    dda_id             | 1121
    u_id               | 24
    ab_id              | 10304
    dda_type           | CHECKING
    dda_status         | PENDING_VERIFICATION
    dda_is_deleted     | f
    dda_verify_op_id   | 44938
    version            | 2
    created            | 2012-03-06 21:37:50.585845
    modified           | 2012-03-06 21:37:50.593425
    c_id               | 
    dda_nickname       | 
    dda_account_name   | 
    cu_id              | 1
    abd_id             | 
    

    See also:

    • man psql => \x
    • man psql => –expanded
    • man psql => \pset => expanded
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using PostgreSQL triggers, is it possible to record the changes that have happened to
I am using postgreSQL. I have a column that: NOT NULL However when I
Assume that you have this code in C#/.NET (using PostgreSQL via ODBC): using System.Data.Odbc;
I'm using PostgreSQL 8.4.6 with CentOS 5.5 and have a table of users: #
I am using Postgresql 8.3 and have the following simple function that will return
I am using postgresql. I have a table called custom_field_answers. The data looks like
I'm using postgresql to host my database. In my database, I have a table
I've been using PostgreSQL a little bit lately, and one of the things that
I am switching from using SQLite3 to PostgreSQL, and hoped that I could populate
I have installed PostgreSQL and pgAdminIII on my Ubuntu Karmic box. I am able

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.