-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Add less
or replace more
with less
(at least for Debian)
#1115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
It's actually a simpler explanation than that -- we didn't explicitly pick one or the other (if you look at our |
Okay, so some other packages must be pulling in the dvv@IT-04027 ~> sudo docker run -it postgres bash
Unable to find image 'postgres:latest' locally
latest: Pulling from library/postgres
1f7ce2fa46ab: Pull complete
8a0c088137b8: Pull complete
11be68f68a2e: Pull complete
19f13c4e1d96: Pull complete
43187fdc5ebc: Pull complete
a84cb0803492: Pull complete
b50a897e2632: Pull complete
7bc6d5552c52: Pull complete
c8161286a3f1: Pull complete
e36f0ab546af: Pull complete
c2a71678092b: Pull complete
7c23bdcac538: Pull complete
16648961c661: Pull complete
Digest: sha256:a2282ad0db623c27f03bab803975c9e3942a24e974f07142d5d69b6b8eaaf9e2
Status: Downloaded newer image for postgres:latest
root@c17d93b14848:/# more
more: bad usage
Try 'more --help' for more information.
root@c17d93b14848:/# which more
/usr/bin/more |
If we can (with minimal effort/breakage) prevent Barring that, I would only consider |
Ah, Edit: to better illustrate: $ docker run -it --rm debian:bookworm-slim more --version
more from util-linux 2.38.1 |
Is there any core functionality of PostgreSQL itself that uses |
Sorry, don't am really unsure about the question here |
Apologies! Let me rephrase. Is there a PostgreSQL provided command or instruction which invokes |
I did some poking around in the upstream source code (which wasn't easy, given the large number of times the word $ git grep -nP "['\"|]"'[[:space:]]*less\b(?![[:space:]-]*(than|equal))'
...
src/include/fe_utils/print.h:25:#define DEFAULT_PAGER "less"
$ git grep -nC4 'DEFAULT_PAGER'
src/fe_utils/print.c-3111- pagerprog = getenv("PSQL_PAGER");
src/fe_utils/print.c-3112- if (!pagerprog)
src/fe_utils/print.c-3113- pagerprog = getenv("PAGER");
src/fe_utils/print.c-3114- if (!pagerprog)
src/fe_utils/print.c:3115: pagerprog = DEFAULT_PAGER;
src/fe_utils/print.c-3116- else
src/fe_utils/print.c-3117- {
src/fe_utils/print.c-3118- /* if PAGER is empty or all-white-space, don't use pager */
src/fe_utils/print.c-3119- if (strspn(pagerprog, " \t\r\n") == strlen(pagerprog))
--
src/include/fe_utils/print.h-19-
src/include/fe_utils/print.h-20-
src/include/fe_utils/print.h-21-/* This is not a particularly great place for this ... */
src/include/fe_utils/print.h-22-#ifndef __CYGWIN__
src/include/fe_utils/print.h:23:#define DEFAULT_PAGER "more"
src/include/fe_utils/print.h-24-#else
src/include/fe_utils/print.h:25:#define DEFAULT_PAGER "less"
src/include/fe_utils/print.h-26-#endif
src/include/fe_utils/print.h-27-
src/include/fe_utils/print.h-28-enum printFormat
src/include/fe_utils/print.h-29-{ When I run |
Yes (ish maybe 😅 ) Postgres ( Source for more info: Hope this makes it more clear, why I am interested in having |
Looks like |
@tianon thanks a lot 😁 🎉 |
I was wondering, hoping, that it would be possible to make it so that the Postgres container would use the
less
command instead ofmore
as it is the default for Postgres (at least if I install theless
command into a container, it will be used instead ofmore
)I assume that the reason for picking
more
instead ofless
has to do with the container size.If that is the case, I would if it is possible to just make the change for the Debian based container because I would assume that the ones which are concerned with the size of the container would be using the Alpine-based container anyway.
If there are some other reasons for using
more
overless
I would like to know 😊The text was updated successfully, but these errors were encountered: