From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Rob Sargent Newsgroups: gmane.emacs.help Subject: Re: sql-postgres connect using URL Date: Thu, 27 Oct 2022 23:36:09 -0600 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11055"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Fri Oct 28 07:37:28 2022 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ooI3c-0002hf-DF for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 28 Oct 2022 07:37:28 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ooI2X-0002R7-DS; Fri, 28 Oct 2022 01:36:21 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ooI2V-0002Qt-Td for help-gnu-emacs@gnu.org; Fri, 28 Oct 2022 01:36:19 -0400 Original-Received: from out03.mta.xmission.com ([166.70.13.233]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ooI2U-0002Iq-1Q for help-gnu-emacs@gnu.org; Fri, 28 Oct 2022 01:36:19 -0400 Original-Received: from in01.mta.xmission.com ([166.70.13.51]:45572) by out03.mta.xmission.com with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1ooI2O-00BI8r-Q4 for help-gnu-emacs@gnu.org; Thu, 27 Oct 2022 23:36:12 -0600 Original-Received: from [155.98.131.0] (port=35510 helo=[10.128.56.136]) by in01.mta.xmission.com with esmtpa (Exim 4.93) (envelope-from ) id 1ooI2O-00EiyD-0X for help-gnu-emacs@gnu.org; Thu, 27 Oct 2022 23:36:12 -0600 Content-Language: en-CA In-Reply-To: X-XM-SPF: eid=1ooI2O-00EiyD-0X; ; ; mid=; ; ; hst=in01.mta.xmission.com; ; ; ip=155.98.131.0; ; ; frm=rsargent@xmission.com; ; ; spf=softfail X-XM-AID: U2FsdGVkX1+cTKMVgzRzeiJyi4flG9BdQZgeJL3P4OE= X-SA-Exim-Connect-IP: 155.98.131.0 X-SA-Exim-Mail-From: rsargent@xmission.com X-SA-Exim-Version: 4.2.1 (built Sat, 08 Feb 2020 21:53:50 +0000) X-SA-Exim-Scanned: Yes (on in01.mta.xmission.com) Received-SPF: pass client-ip=166.70.13.233; envelope-from=rsargent@xmission.com; helo=out03.mta.xmission.com X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: "help-gnu-emacs" Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:140450 Archived-At: On 10/27/22 23:25, Jean Louis wrote: > * Rob Sargent [2022-10-28 07:48]: >> This clearly works from the command line: >> >> psql >> postgresql://postgres@csgsdb/postgres?&keepalives_idle=60&keepalives_interval=30&keepalives_count=10 > I had no idea about it. > >> I do get connected to the database, at least.  I'll have to wait for the >> time out to NOT happen :). Meanwhile I'm connecting with emacs in the usual >> way, then once connected I issue a >> >> \c host=hostname user=rolename keepalives_idle=60 >> keepalives_interval=30 keepalives_count=10 > Then use variable sql-postgres-options to add extra arguments to > psql. > > You can also use ~/.psqlrc to set things up. > > But question becomes How to stop emacs from prompting for all the usual args (host, etc). Null the alist of prompts I suppose.  Let me dig in.