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 19:53:04 -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="15600"; 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 03:54: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 1ooEZo-0003r6-6n for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 28 Oct 2022 03:54:28 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ooEZ2-0001n2-Kc; Thu, 27 Oct 2022 21:53:40 -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 1ooEYw-0001kk-FM for help-gnu-emacs@gnu.org; Thu, 27 Oct 2022 21:53:35 -0400 Original-Received: from out01.mta.xmission.com ([166.70.13.231]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ooEYq-0001Et-UX for help-gnu-emacs@gnu.org; Thu, 27 Oct 2022 21:53:32 -0400 Original-Received: from in02.mta.xmission.com ([166.70.13.52]:46868) by out01.mta.xmission.com with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1ooEYW-008iO9-8V for help-gnu-emacs@gnu.org; Thu, 27 Oct 2022 19:53:08 -0600 Original-Received: from [155.98.131.0] (port=3015 helo=[10.128.56.136]) by in02.mta.xmission.com with esmtpa (Exim 4.93) (envelope-from ) id 1ooEYV-00GBT8-Fe for help-gnu-emacs@gnu.org; Thu, 27 Oct 2022 19:53:07 -0600 Content-Language: en-CA In-Reply-To: X-XM-SPF: eid=1ooEYV-00GBT8-Fe; ; ; mid=; ; ; hst=in02.mta.xmission.com; ; ; ip=155.98.131.0; ; ; frm=rsargent@xmission.com; ; ; spf=softfail X-XM-AID: U2FsdGVkX19wYmblTBHduZUp1wndKYTqkB59mhtR0Qk= 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 in02.mta.xmission.com) Received-SPF: pass client-ip=166.70.13.231; envelope-from=rsargent@xmission.com; helo=out01.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, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, 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:140443 Archived-At: On 10/27/22 14:56, Jean Louis wrote: > * Rob Sargent [2022-10-27 23:05]: >> I need to be able to supple option TCP options in my sql-postgres sessions. >> >> I've tried the following, without effect so far. >> >> |(setq sql-connection-alist '(db (sql-product 'postgres) (sql-database >> ("postgresql://myusername@host/dbname?keepalives_idle=69?other=...")))| > I think PostgreSQL listens on TCP port by default, so what you need to > supply are variables > > (setq sql-database "my-db") > (setq sql-password "my-pass") > (setq sql-postgres-login-params (quote (user password server database))) > (setq sql-postgres-program "psql") > (setq sql-product (quote postgres)) > (setq sql-server "my-remote-server") > (setq sql-user "my-user") > > Yeah, that follows the expected pattern and my usual usage but I need to use the URL style connection string.  I don't believe the command line args include keepalives*