tag:blogger.com,1999:blog-8839574367290288724.post886592765741103819..comments2023-12-11T13:13:11.330-08:00Comments on Pavel Stehule's blog: short post - pspg is ready for releasePavel Stěhulehttp://www.blogger.com/profile/01996484227228696817noreply@blogger.comBlogger18125tag:blogger.com,1999:blog-8839574367290288724.post-75618207128127099522017-09-15T10:28:27.204-07:002017-09-15T10:28:27.204-07:00I tested pspg on an up to date Debian 9 with Pg 9....I tested pspg on an up to date Debian 9 with Pg 9.6. <br />I compiled it with just a simple make. It works as expected.<br />I have found just a small typo: The error message for -s states that there are only 11 colour schemas while in the program there are 12.<br />Wolfgangnoreply@blogger.comtag:blogger.com,1999:blog-8839574367290288724.post-55919652351312663202017-09-14T08:27:26.628-07:002017-09-14T08:27:26.628-07:00Yes, you are right!
The issue on a psql 9.4
With ...Yes, you are right!<br /><br />The issue on a psql 9.4<br />With psql 9.6 worked fine.PLhttps://www.blogger.com/profile/06653430848748813481noreply@blogger.comtag:blogger.com,1999:blog-8839574367290288724.post-91374255346729776292017-09-14T08:21:31.948-07:002017-09-14T08:21:31.948-07:00It is strange. Any new query means new instance of...It is strange. Any new query means new instance of pspg. So when you stop pspg, then it is finished, and with new query, then it should to get fresh window size. So it looks like the core of the issue will be else where. What is psql version? Some older psql clients had a issue with resizing.Pavel Stěhulehttps://www.blogger.com/profile/01996484227228696817noreply@blogger.comtag:blogger.com,1999:blog-8839574367290288724.post-32930262198833605802017-09-14T08:16:06.995-07:002017-09-14T08:16:06.995-07:00Hm, without psql it working.
Here my actions:
1. ...Hm, without psql it working.<br /><br />Here my actions:<br />1. run select * from pg_class to start pspg<br />2. Resize terminal window<br />3. After resizing pspg still correctly working with this query!<br />4. Stop pspg (by pressing q)<br />5. Run another query and pspg stops working correctly<br />6. When restarting psql, pspg works correctly again.PLhttps://www.blogger.com/profile/06653430848748813481noreply@blogger.comtag:blogger.com,1999:blog-8839574367290288724.post-60110495090183899462017-09-14T08:00:11.724-07:002017-09-14T08:00:11.724-07:00probably this is a reason. The resizing there does...probably this is a reason. The resizing there doesn't work well when the application is nested. You can try direct call of pspg (without psql) by pspg -f somefile. Is resizing working there?Pavel Stěhulehttps://www.blogger.com/profile/01996484227228696817noreply@blogger.comtag:blogger.com,1999:blog-8839574367290288724.post-51835714435818614132017-09-14T07:44:45.851-07:002017-09-14T07:44:45.851-07:00I use libncursesw5-dev on Ubuntu.I use libncursesw5-dev on Ubuntu.PLhttps://www.blogger.com/profile/06653430848748813481noreply@blogger.comtag:blogger.com,1999:blog-8839574367290288724.post-76180037557047612212017-09-14T07:37:54.841-07:002017-09-14T07:37:54.841-07:00What ncurses version do you use? I have not a prob...What ncurses version do you use? I have not a problem with ncurses 6 - ncurses-6.0-8.20170212.fc26.src.rpmPavel Stěhulehttps://www.blogger.com/profile/01996484227228696817noreply@blogger.comtag:blogger.com,1999:blog-8839574367290288724.post-35204430652192716932017-09-14T07:26:20.793-07:002017-09-14T07:26:20.793-07:00Pavel,
Even when I run locally, it doesn't wor...Pavel,<br />Even when I run locally, it doesn't work for new query after resizing.PLhttps://www.blogger.com/profile/06653430848748813481noreply@blogger.comtag:blogger.com,1999:blog-8839574367290288724.post-76790843860784424942017-09-14T07:00:21.327-07:002017-09-14T07:00:21.327-07:00@PL - It is working somewhere. Looks like not ever...@PL - It is working somewhere. Looks like not everywhere ncurses mechanism is working. When I call psql and pspg locally, then it is working. When I use ssh it doesn't work. It can be related to ncurses version too.Pavel Stěhulehttps://www.blogger.com/profile/01996484227228696817noreply@blogger.comtag:blogger.com,1999:blog-8839574367290288724.post-43836730905990915432017-09-14T06:45:01.189-07:002017-09-14T06:45:01.189-07:00Very nice. Thanks!
It seems that pspg currently d...Very nice. Thanks!<br /><br />It seems that pspg currently does not handle window resizing.PLhttps://www.blogger.com/profile/06653430848748813481noreply@blogger.comtag:blogger.com,1999:blog-8839574367290288724.post-69680605179198111232017-09-13T05:08:19.520-07:002017-09-13T05:08:19.520-07:00Although there are still some artefacts for horizo...Although there are still some artefacts for horizontal scrolling (maybe due wrong calculation display len) it is much better.Pavel Stěhulehttps://www.blogger.com/profile/01996484227228696817noreply@blogger.comtag:blogger.com,1999:blog-8839574367290288724.post-83794762176936079992017-09-13T02:13:07.581-07:002017-09-13T02:13:07.581-07:00I started new issue - https://github.com/okbob/psp...I started new issue - https://github.com/okbob/pspg/issues/19Pavel Stěhulehttps://www.blogger.com/profile/01996484227228696817noreply@blogger.comtag:blogger.com,1999:blog-8839574367290288724.post-41821255911870376012017-09-12T13:35:21.873-07:002017-09-12T13:35:21.873-07:00Here you go:
https://github.com/loveencounterflow...Here you go:<br /><br />https://github.com/loveencounterflow/fwtest<br /><br />Hope it helps, <br />cheersJohn Frazerhttps://www.blogger.com/profile/01365987834790270780noreply@blogger.comtag:blogger.com,1999:blog-8839574367290288724.post-10825884609166669652017-09-12T09:43:55.620-07:002017-09-12T09:43:55.620-07:00please, send me a test case. Maybe the issue is on...please, send me a test case. Maybe the issue is on psql side, maybe in psps. Pavel Stěhulehttps://www.blogger.com/profile/01996484227228696817noreply@blogger.comtag:blogger.com,1999:blog-8839574367290288724.post-69840153079110212022017-09-12T09:33:52.097-07:002017-09-12T09:33:52.097-07:00I think the screenshot demonstrate quite nicely wh...I think the screenshot demonstrate quite nicely what I'm talking about. I could give you a bunch of *.sql files to feed into a test database if that is helpful (in case you want to take up the challenge at all).John Frazerhttps://www.blogger.com/profile/01365987834790270780noreply@blogger.comtag:blogger.com,1999:blog-8839574367290288724.post-86232142972116144862017-09-12T09:30:13.366-07:002017-09-12T09:30:13.366-07:00I used
gcc pager.c -o pager -L. -lncursesw
to c...I used <br /><br />gcc pager.c -o pager -L. -lncursesw<br /><br />to compile like I did before. Czech chars and everything outside of 7bit ASCII is one problem, but the other one is graphically wide characters. <br /><br />Some time ago I published https://github.com/loveencounterflow/to-width which uses a bunch of helpful Unicode-aware packages (sindresorhus/string-width and martinheidegger/wcstring which you find on npmjs.org and github) to achieve constant-width output in the presence of mixed narrow (single-cell) and wide (double-cell) codepoints.John Frazerhttps://www.blogger.com/profile/01365987834790270780noreply@blogger.comtag:blogger.com,1999:blog-8839574367290288724.post-63306654188199947462017-09-12T09:10:24.565-07:002017-09-12T09:10:24.565-07:00I am using Czech chars in UTF8 encoding and there ...I am using Czech chars in UTF8 encoding and there are not issues, please, recheck - ncursesw should be used if you are using wide chars.Pavel Stěhulehttps://www.blogger.com/profile/01996484227228696817noreply@blogger.comtag:blogger.com,1999:blog-8839574367290288724.post-9405830929455905712017-09-12T06:21:10.028-07:002017-09-12T06:21:10.028-07:00Hi there, thanks for your efforts, I compiled comm...Hi there, thanks for your efforts, I compiled commit 9226ea543d23 and can say it does work (I didn't look long for any new stuff though).<br /><br />I may have a biggy, though; I do a lot of Chinese database stuff and pspg is a godsend to me. However I realized that column alignments are regularly out of sync as soon as double-width characters are displayed. I'm not sure but wasn't it the case that they do align just fine, as they do in 'most' (but sadly not in 'less')?<br /><br />I've been working on so many things in the meantime so my memory could be wrong. <br /><br />I could supply some test data if you think you might work on that. Double-width characters do work in 'most', as I said, so that is proof it is in principle feasable.John Frazerhttps://www.blogger.com/profile/01365987834790270780noreply@blogger.com