Comments (33)
from pspg.
sqlcl
has some of the most advanced scripting functionality I've ever seen in a command line SQL client. I'm able to write JavaScript that uses the Java libraries and control everything, even getting it to output to a pager, which I've just tested successfully.
I'm doing this for my qsh project.
Thanks for the pipe, I'll give that a go for now!
from pspg.
I came up with this in the end:
sed '1d; 2s/\x1b\[[0-9;]*[mG]//g; 3s/_/-/g' oracle-sqlcl.output.txt | pspg
I think is probably good enough for what I need to do, can close this one also if you want.
from pspg.
from pspg.
Any ideas why this file would be weird in pspg
? If you scroll the first row, the second row doesn't scroll.
from pspg.
from pspg.
OK, understand, will try & figure out where that line went, thanks
from pspg.
from pspg.
I checked more documentation, and I think so ANSICONSOLE format cannot be supported. SQLcl mix lines with column names with line with underscore together, and I cannot to emulate this effect in pspg. And printing the line with underscores on separate line doesn't look well (I'll implemented, but the it will not be officially supported). I think so DEFAULT format can be supported. Just the problem with missing footer line should be fixed. I checked documentation, and sometimes number of rows was printed, sometimes not.
from pspg.
with last commit I can read all files that you sent. Please, can you check it?
from pspg.
Hey, that's great! Will take & look tomorrow and let you know
from pspg.
Just tried it out & everything is working great :)
I saw that when the column headers are repeated it kind of works, but I think this will be fine. There is a sqlcl (and sqlplus) setting called pagesize
, however, the maximum value you can set it to is only 50000. I decompiled the Java code for sqlcl and found that this is used to actually populate a sqlcl context property called script.runner.setpagesize
, which you can set directly to any value, so I update this to 1000000, which I think should work for most cases.
Having the footer not be a problem is great, and it's also really cool that it works with ansiconsole format. I wanted people to able to use a different pager if they didn't have pspg installed, so this will mean it works in less.
Top job!
from pspg.
from pspg.
Yes, absolutely, will do a pull request; this will reference qsh
, as I currently haven't seen anybody else make paging work for it.
I thinking I could also do a very cutdown single script you could use just for the paging functionality, will include that also
from pspg.
from pspg.
Hey, got a slight issue with the attached file, the column name gets repeated.
from pspg.
Can me send a screenshots? I see correct output. What options do you use for pspg?
from pspg.
I've got $PSPG
set to -XFb --no-bars --no-mouse --no-scrollbar --bold-labels -s 17
.
This is what I'm seeing:
from pspg.
from pspg.
last commit should to fix it. Please, check it.
from pspg.
I'm using the latest commit on master, but something is definitely wrong; I don't seem to get any output for all types of different files that normally work fine.
I tried with the current pspg release and they work, but with the build from master I get nothing. Try the sqlcl.output.txt
file from before
from pspg.
There is something strange - I cannot to reproduce it. It is working on my comp without any problem.
Can you recheck compilation? Can you send me a log file? run pspg with parameter --log
from pspg.
Yep, not sure what is going on. I've recloned the repo and did a new build, but I'm getting the same thing.
I attached the configure
and make
logs for the build and the log files for both the original and new versions. The new version thinks there are no rows in the file for some reason.
pspg-new.log
pspg-orig.log
make.log
configure.log
from pspg.
from pspg.
Actually, I think I've found the issue: if I pipe into pspg I get the problem, but if I use the file as a parameter it's fine :)
from pspg.
from pspg.
Yep, I'm using a pipe, but this has always worked for me before. I've tried in xterm
and I'm getting the same issue.
I'm running Manjaro linux, and I don't think my setup is crazy.
from pspg.
from pspg.
from pspg.
👍 👍
from pspg.
please. can you check last commit?
from pspg.
Looks good!
from pspg.
from pspg.
Related Issues (20)
- segfault when watching non existing --querystream file HOT 4
- Saving to CSV on large number of rows only exports partial rows HOT 22
- Sort doesn't work... HOT 3
- Feature: Sort multiple columns individually as a sequence of sort steps HOT 4
- difference in pgcli and psql table behavior in pspg HOT 4
- Feature: Handle long columns. Add option for max column width, and keybindings to scroll within the long column, etc. HOT 2
- NullPointerException when running pspg in sqlcl HOT 3
- Exactly what data does pspg receive from psql? HOT 1
- warning: integer overflow in expression of type ‘long int’ results in ‘0’ HOT 2
- Feature Request: Customize the word wrap character HOT 4
- Segfault on KOI8-RU file HOT 4
- Clearer + more visible installation instructions? HOT 6
- Windows support? HOT 5
- Getting issues while trying to query out data with postgis HOT 1
- `No data` on files with more than 1000 lines HOT 14
- How do you exit the menu? HOT 42
- .pspg_conf file format - FYI for users HOT 1
- nushell support ❤️ HOT 3
- Feature request: possibility for faster watch time HOT 6
- Add support for clip.exe inside WSL2 HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pspg.