[prev in list] [next in list] [prev in thread] [next in thread] 

List:       postgresql-general
Subject:    Re: Feature request: psql --idle
From:       Wiwwo Staff <wiwwo () wiwwo ! com>
Date:       2022-07-28 9:23:11
Message-ID: CAFe70G7vWKotKmEJi9UKbGy66QM=BvqkFQbG1PbUg2dd06wU_A () mail ! gmail ! com
[Download RAW message or body]

Thanks all for the alternative solutions.
Yet, despite of my (wrong and misleading) use-case, I still share Julien's
view of this being useful, whatever the parameter or the use-case.

My 2 cents :-)


On Wed, Jul 27, 2022 at 2:49 PM Wiwwo Staff <wiwwo@wiwwo.com> wrote:

> Since changing ph_hda.conf file to give users access involves the restart
> of server, many companies I work(ed) use a bastion host, where users ssh
> to, and are allowed "somehow" use postgresql.
>
> Still, those users need some login shell.
>
> It would be great to give them psql as a login shell (in /etc/passwd).
> But doing so, will result in psql exiting with error with the usual
> $ psql
> psql: error: connection to server on socket "/tmp/.s.PGSQL.5432" failed:
> No such file or directory
> Is the server running locally and accepting connections on that socket?
>
> What would help, is a --idle option, where psql does not exit, stays idle
> and waits for user to give a \conn command.
> Something similar to
> sqlplus /nolog
>
> Is anything like that feasible or is there another solution/workaround?
>
> Tnx!
>

[Attachment #3 (text/html)]

<div dir="ltr"><div>Thanks all for the alternative solutions.</div><div>Yet, despite \
of my (wrong and misleading) use-case, I still share Julien&#39;s view of this being \
useful, whatever the parameter or the use-case.<br></div><div><br></div><div>My 2 \
cents :-)<br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" \
class="gmail_attr">On Wed, Jul 27, 2022 at 2:49 PM Wiwwo Staff &lt;<a \
href="mailto:wiwwo@wiwwo.com">wiwwo@wiwwo.com</a>&gt; wrote:<br></div><blockquote \
class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid \
rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Since changing ph_hda.conf \
file to give users access involves the restart of server, many companies I work(ed) \
use a bastion host, where users ssh to, and are allowed &quot;somehow&quot; use \
postgresql.</div><div><br></div><div>Still, those users need some login \
shell.</div><div><br></div><div>It would be great to give them psql as a login shell \
(in /etc/passwd).</div><div>But doing so, will result in psql exiting with error with \
the usual</div><div>$ psql<br>psql: error: connection to server on socket \
&quot;/tmp/.s.PGSQL.5432&quot; failed: No such file or directory<br>	Is the server \
running locally and accepting connections on that \
socket?</div><div><br></div><div>What would help, is a --idle option, where psql does \
not exit, stays idle and waits for user to give a \conn command.</div><div>Something \
similar to <br></div><div>sqlplus /nolog</div><div><br></div><div>Is anything like \
that feasible or is there another \
solution/workaround?<br></div><div><br></div><div>Tnx!<br></div></div> \
</blockquote></div>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic