On January 27th, this site will be read-only as we migrate to Oracle Forums for an improved community experience. You will not be able to initiate activity until January 30th, when you will be able to use this site as normal.

    Forum Stats

  • 3,889,626 Users
  • 2,269,768 Discussions
  • 7,916,798 Comments

Discussions

Support for external pager

user7543419
user7543419 Member Posts: 5
edited Jan 7, 2019 10:43AM in SQLcl

How do I get results sent to an external pager command (such as less/more)?

If there is currently no way to do this, I'd like to make this a feature request.

Being able to navigate/search query results with an external pager is a very useful thing and support for this should be a basic feature in my opinion.

Thanks.

Answers

  • Gaz in Oz
    Gaz in Oz Member Posts: 3,785 Bronze Crown
    edited Jan 6, 2019 7:38PM

    I achieve similar functionality via spool to a file and use my favourite text editor, vi (vim).

    SQL> set _editor=vim

    SQL> spool a_file.txt

    SQL> select col1, ...coln from a_table where...

    SQL> spool off

    SQL> ed a_file.txt

    ...

  • user7543419
    user7543419 Member Posts: 5
    edited Jan 7, 2019 10:43AM

    I though of that, but really?  What a pain to have to do something like that around every query!  BTW instead of 'ed a_file.txt' I'd probably use 'ho less a_file.txt;rm a_file.txt'.