Re: [HACKERS] Issues with building snap packages and psql

2016-10-27 Thread Robert Haas
On Thu, Oct 27, 2016 at 12:24 PM, Joshua D. Drake wrote: > This problem clearly an improper implementation on our part. We have found a > work around by wrapping the launch of psql so we can set PSQLRC. At some > point, perhaps with v10 we could change this. This problem has been noted on > other

Re: [HACKERS] Issues with building snap packages and psql

2016-10-27 Thread Joshua D. Drake
On 10/26/2016 12:10 PM, Joshua D. Drake wrote: On 10/26/2016 11:33 AM, Robert Haas wrote: On Wed, Oct 26, 2016 at 2:22 PM, Joshua D. Drake It is also inconsistent with how other programs behave. For example if psql uses readline, and you change the value of $HOME, then readline uses $HOME/.in

Re: [HACKERS] Issues with building snap packages and psql

2016-10-26 Thread Joshua D. Drake
On 10/26/2016 11:33 AM, Robert Haas wrote: On Wed, Oct 26, 2016 at 2:22 PM, Joshua D. Drake wrote: After some further investigation and collaboration with #postgresql it looks like what we have here is an actual bug or at least improper implementation. Apparently, we use getpwuid on the euid to

Re: [HACKERS] Issues with building snap packages and psql

2016-10-26 Thread Robert Haas
On Wed, Oct 26, 2016 at 2:22 PM, Joshua D. Drake wrote: > After some further investigation and collaboration with #postgresql it looks > like what we have here is an actual bug or at least improper implementation. > Apparently, we use getpwuid on the euid to locate the 'home directory'. This > is

Re: [HACKERS] Issues with building snap packages and psql

2016-10-26 Thread Joshua D. Drake
Hello, After some further investigation and collaboration with #postgresql it looks like what we have here is an actual bug or at least improper implementation. Apparently, we use getpwuid on the euid to locate the 'home directory'. This is incorrect (as well as inconsistent to our own docume

Re: [HACKERS] Issues with building snap packages and psql

2016-10-26 Thread Joshua D. Drake
On 10/26/2016 10:26 AM, Andres Freund wrote: On October 26, 2016 8:09:11 PM GMT+03:00, "Joshua D. Drake" wrote: postgres=# \! export export HOME='/home/jd/snap/postgresql96/1' That doesn't do much. Isn't that just spawning a shell in which you set the variable, which then immediately exi

Re: [HACKERS] Issues with building snap packages and psql

2016-10-26 Thread Andres Freund
On October 26, 2016 8:09:11 PM GMT+03:00, "Joshua D. Drake" wrote: >postgres=# \! export >export HOME='/home/jd/snap/postgresql96/1' That doesn't do much. Isn't that just spawning a shell in which you set the variable, which then immediately exits? And this the value isn't set anywhere rele

Re: [HACKERS] Issues with building snap packages and psql

2016-10-26 Thread Joshua D. Drake
On 10/26/2016 10:16 AM, Tom Lane wrote: "Joshua D. Drake" writes: Is psql getting the home directory from /etc/passwd? Yes, of course. If so what can we do about that? Fix your /etc/passwd entry? Seems unlikely that psql is the only program that believes that entry. It isn't that simpl

Re: [HACKERS] Issues with building snap packages and psql

2016-10-26 Thread Tom Lane
"Joshua D. Drake" writes: > Is psql getting the home directory from /etc/passwd? Yes, of course. > If so what can we do about that? Fix your /etc/passwd entry? Seems unlikely that psql is the only program that believes that entry. regards, tom lane -- Sent via pgsql

[HACKERS] Issues with building snap packages and psql

2016-10-26 Thread Joshua D. Drake
Hello, CMD has been working on building snap packages. It has been an adventure and we are very close to having them complete. In fact they are complete enough that we have published them in the snap repo. jd@jd-wks:~$ snap find postgres NameVersion Developer Notes Summary post