Re: psql --no-connect option

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Julien Rouhaud <rjuju123(at)gmail(dot)com>
Cc: Gurjeet Singh <gurjeet(at)singh(dot)im>, Postgres Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: psql --no-connect option
Date: 2023-08-25 04:26:47
Message-ID: CAFj8pRACBNekLHdMKJX-f78OHuHT40n1313O2b=8wTBvtQ6JWg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

pá 25. 8. 2023 v 6:21 odesílatel Julien Rouhaud <rjuju123(at)gmail(dot)com> napsal:

> Hi,
>
> On Thu, Aug 24, 2023 at 12:55:30PM -0700, Gurjeet Singh wrote:
> > Currently, psql exits if a database connection is not established when
> > psql is launched.
> >
> > Sometimes it may be useful to launch psql without connecting to the
> > database. For example, a user may choose to start psql and then pipe
> > commands via stdin, one of which may eventually perform the \connect
> > command. Or the user may be interested in performing operations that
> > psql can perform, like setting variables etc., before optionally
> > initiating a connection.
> >
> > The attached patch introduces the --no-connect option, which allows
> > psql to continue operation in absence of connection options.
>
> FTR this has been discussed in the past, see at least [1].
>
> I was interested in this feature, suggesting the exact same "--no-connect"
> name, so still +1 for this patch (note that I haven't read it).
>
> [1]:
> https://www.postgresql.org/message-id/flat/CAFe70G7iATwCMrymVwSVz7NajxCw3552TzFFHvkJqL_3L6gDTA%40mail.gmail.com

+1

Pavel

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2023-08-25 04:28:13 Re: logical_replication_mode
Previous Message Julien Rouhaud 2023-08-25 04:20:58 Re: psql --no-connect option