From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jakob Lombacher Subject: Re: [PATCH] custom port for postgresql Date: Fri, 16 Sep 2016 09:48:45 +0200 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=001a114b6886274e19053c9b316e Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:40171) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bknuW-0001Os-C0 for emacs-orgmode@gnu.org; Fri, 16 Sep 2016 03:50:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bknuS-0002Ik-4H for emacs-orgmode@gnu.org; Fri, 16 Sep 2016 03:50:11 -0400 Received: from mail-wm0-f54.google.com ([74.125.82.54]:35865) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bknuR-0002BC-QY for emacs-orgmode@gnu.org; Fri, 16 Sep 2016 03:50:08 -0400 Received: by mail-wm0-f54.google.com with SMTP id b187so22359146wme.1 for ; Fri, 16 Sep 2016 00:49:46 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Adam Porter Cc: emacs-orgmode@gnu.org --001a114b6886274e19053c9b316e Content-Type: multipart/alternative; boundary=001a114b6886274e12053c9b316c --001a114b6886274e12053c9b316c Content-Type: text/plain; charset=UTF-8 Hi Adam, thanks for the "patch" hint ;-) I changed the dbport as optional argument and added the dbpassword option as well. Jakob 2016-09-14 7:04 GMT+02:00 Adam Porter : > Jakob Lombacher writes: > > > -(defun org-babel-sql-dbstring-postgresql (host user database) > > +(defun org-babel-sql-dbstring-postgresql (host port user database) > > Hi Jakob, > > Two suggestions: > > 1. Generally people put something like "[PATCH]" in the subject so that > the maintainers will know it contains a patch. :) > > 2. I'd suggest putting the new `port` argument at the end of the > argument list, after an `&optional`. Even though it makes more sense to > put it after the host, putting it at the end and making it optional > means that people won't have to change existing code that calls this > function. > > Thanks for submitting the patch. > > > --001a114b6886274e12053c9b316c Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi Adam,

thanks for the "patch= " hint ;-)

I changed the dbport as optional argument= and added the dbpassword option as well.

Jako= b

2016-09-14 7:04 GMT+02:00 Adam Porter <adam@alphapapa.net>= :
Jakob Lombacher <Jakob@lombacher.net> writes:

> -(defun org-babel-sql-dbstring-postgresql (host user database) > +(defun org-babel-sql-dbstring-postgresql (host port user databas= e)

Hi Jakob,

Two suggestions:

1.=C2=A0 Generally people put something like "[PATCH]" in the sub= ject so that
the maintainers will know it contains a patch.=C2=A0 :)

2.=C2=A0 I'd suggest putting the new `port` argument at the end of the<= br> argument list, after an `&optional`.=C2=A0 Even though it makes more se= nse to
put it after the host, putting it at the end and making it optional
means that people won't have to change existing code that calls this function.

Thanks for submitting the patch.



--001a114b6886274e12053c9b316c-- --001a114b6886274e19053c9b316e Content-Type: text/x-patch; charset=US-ASCII; name="0001-add-dbport-and-dbpassword-options-to-psql.patch" Content-Disposition: attachment; filename="0001-add-dbport-and-dbpassword-options-to-psql.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_it5gnuvp0 RnJvbSBlOTJlNTk4MmMzYThkYjEyNWUxNjFkNjc2ODM1YjQ3ZWQzODA2MDcxIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBKYWtvYiBMb21iYWNoZXIgPEpha29iQExvbWJhY2hlci5uZXQ+ CkRhdGU6IEZyaSwgMTYgU2VwIDIwMTYgMDk6MTI6NTYgKzAyMDAKU3ViamVjdDogW1BBVENIXSBh ZGQgZGJwb3J0IGFuZCBkYnBhc3N3b3JkIG9wdGlvbnMgdG8gcHNxbAoKLS0tCiBsaXNwL29iLXNx bC5lbCB8IDggKysrKystLS0KIDEgZmlsZSBjaGFuZ2VkLCA1IGluc2VydGlvbnMoKyksIDMgZGVs ZXRpb25zKC0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