Re: Display of text fields
От | Ennio-Sr |
---|---|
Тема | Re: Display of text fields |
Дата | |
Msg-id | 20040908192918.GA23933@deby.ei.hnet обсуждение исходный текст |
Ответ на | Re: Display of text fields (Richard Huxton <dev@archonet.com>) |
Ответы |
Re: Display of text fields
|
Список | pgsql-general |
* Richard Huxton <dev@archonet.com> [020904, 16:54]: > Ennio-Sr wrote: > > >My questions are then: > > > > [cut] > >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 > Further to my message of 3rd inst. Following your suggestion and after reading some documents, I created this sql script: ----- SELECT scheda_ltr, case scheda_ltr when 'T' then select * from bib_lt; else 'autore, titolo, editore from bib_lt;' end FROM bib_lt; ----- but the result is not what I was after: I get a list with either label according to scheda_ltr being 'T' or not! Is there any way, once the case is spotted, to obtain execution of the query relating to that case, instead of just showing the label? Of course I tried without the quotes obtaining parser error. > >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 ... > Tried substring(memo,1, 1400) ## I think the numbers refer to bytes, ## not rows (with 1,80 shows nothing) but the uncontrolled scrolling is still there :-( It's really sad, with all those possibilities offered by 'substr' ! Thanks for any help, 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) ]
В списке pgsql-general по дате отправления: