Re: Display of text fields - Mailing list pgsql-general

From Richard Huxton
Subject Re: Display of text fields
Date
Msg-id 41374245.4020106@archonet.com
Whole thread Raw
In response to Display of text fields  (Ennio-Sr <nasr.laili@tin.it>)
Responses Re: Display of text fields
Re: Display of text fields
List pgsql-general
Ennio-Sr wrote:

> My questions are then:
>
> 1. Is there a way to avoid displaying the '---------' lines, apart from
>    the \a flag ?

I don't think so, not in that layout.

> 2. In case I put the memos in the main table, would it be possible to
>    control someway the display of memo-text fields? [Only some of the
>    records have a memo, and a referring col set to 'T', so I'm looking
>    for a selective instruction, such as: if ctl_memo='T' display memo,
>    else, display the other cols only].

Use a view along with a CASE...END expression

> 3. Does the pager work better on version 7.4.3?

I'm not aware of any changes. Is the problem when you have a single
text-field that takes up too much space? If so, I'd construct my view
with a substring:

CREATE VIEW my_view AS
SELECT a,b,c,substring(long_memo_field, 1, 80)
FROM ...

HTH
--
   Richard Huxton
   Archonet Ltd

pgsql-general by date:

Previous
From: Graeme Hinchliffe
Date:
Subject: Nicer way to access field
Next
From: Ron St-Pierre
Date:
Subject: psql \o weirdness