Re: Display of text fields

From: Ennio-Sr <nasr(dot)laili(at)tin(dot)it>
To: Richard Huxton <dev(at)archonet(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Display of text fields
Date: 2004-09-02 22:12:35
Message-ID: 20040902221235.GA13383@deby.ei.hnet
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

* Richard Huxton <dev(at)archonet(dot)com> [020904, 16:54]:
> Ennio-Sr wrote:
>
> >My questions are then:
> [ ... ]
> >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?

Not necessarily. I'm testing with a table containing a dozen text
fields, each one large from 6 to 20 lines; so, when I run a select with
no 'limit n', (I suppose) the pager doesn't know how to split the text
field in order to accomodate it to the max no. of lines the screen can
show.
e.g., if rec. no 1 has a text of 15 lines and rec. 2 has 20 lines, the
pager should be able to split rec. no. 2 into two parts (9 lines to the
first - so that it can show together with rec. no. 1 (15+9=24) - and 11
to the second.

> 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 ...
>

Thank you so much, Richard! I'll search the documentation for the
solutions you suggest which I'm not yet acquainted with ...
Ennio

--
[Perche' usare Win$ozz (dico io) se ..."anche uno sciocco sa farlo. \\?//
Fa' qualche cosa di cui non sei capace!" (diceva Henry Miller) ] (°|°)
[Why to use Win$ozz (I say) if ... "even a fool can do that. )=(
Do something you aren't good at!" (used to say Henry Miller) ]

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Daniel M. 2004-09-02 23:00:28 Ensuring data consistency - main table and multiple 'details' tables.
Previous Message Tom Lane 2004-09-02 21:43:28 Re: Debugging