Thread
Commits
-
Doc: improve documentation about where the psqlrc files are.
- f734857a9211 16.0 landed
- e0636ca90b81 15.0 landed
-
Make Windows 10 the minimal runtime requirement for WIN32
- 495ed0ef2d72 16.0 cited
-
small windows psqlrc re-wording
Robert Treat <rob@xzilla.net> — 2022-07-27T18:42:11Z
Howdy folks, The attached patch tweaks the wording around finding the psqlrc file on windows, with the primary goal of removing the generally incorrect statement that windows has no concept of a home directory. Robert Treat https://xzilla.net
-
Re: small windows psqlrc re-wording
Julien Rouhaud <rjuju123@gmail.com> — 2022-07-28T13:45:30Z
Hi, On Wed, Jul 27, 2022 at 02:42:11PM -0400, Robert Treat wrote: > > The attached patch tweaks the wording around finding the psqlrc file > on windows, with the primary goal of removing the generally incorrect > statement that windows has no concept of a home directory. Windows only has a concept of home directory since Vista, so that used to be true. Anyway, since we don't support XP or anything older since about 3 weeks ago (495ed0ef2d72a6a74def296e042022479d5d07bd), +1 for the patch.
-
Re: small windows psqlrc re-wording
Tom Lane <tgl@sss.pgh.pa.us> — 2022-07-28T14:04:12Z
Julien Rouhaud <rjuju123@gmail.com> writes: > On Wed, Jul 27, 2022 at 02:42:11PM -0400, Robert Treat wrote: >> The attached patch tweaks the wording around finding the psqlrc file >> on windows, with the primary goal of removing the generally incorrect >> statement that windows has no concept of a home directory. > Windows only has a concept of home directory since Vista, so that used to be > true. > Anyway, since we don't support XP or anything older since about 3 weeks ago > (495ed0ef2d72a6a74def296e042022479d5d07bd), +1 for the patch. If all supported versions do have home directories now, should we instead think about aligning the Windows behavior with everywhere else? regards, tom lane
-
Re: small windows psqlrc re-wording
Julien Rouhaud <rjuju123@gmail.com> — 2022-07-28T14:19:28Z
On Thu, Jul 28, 2022 at 10:04:12AM -0400, Tom Lane wrote: > Julien Rouhaud <rjuju123@gmail.com> writes: > > On Wed, Jul 27, 2022 at 02:42:11PM -0400, Robert Treat wrote: > >> The attached patch tweaks the wording around finding the psqlrc file > >> on windows, with the primary goal of removing the generally incorrect > >> statement that windows has no concept of a home directory. > > > Windows only has a concept of home directory since Vista, so that used to be > > true. > > Anyway, since we don't support XP or anything older since about 3 weeks ago > > (495ed0ef2d72a6a74def296e042022479d5d07bd), +1 for the patch. > > If all supported versions do have home directories now, should we > instead think about aligning the Windows behavior with everywhere > else? As far as I know the expected usage on Windows is still different. Even with home directories application are still expected to put stuff in %APPDATA% (1), in a dedicated directory. That's especially important since there is still no concept of "hidden" files and the explorer still hides the extensions by default. I can however see that having a file named ".something" is now mostly working, which IIRC wasn't really the case the last time I used Windows (around XP). [1] https://en.wikipedia.org/wiki/Special_folder#File_system_directories
-
Re: small windows psqlrc re-wording
Tom Lane <tgl@sss.pgh.pa.us> — 2022-07-28T14:28:04Z
Julien Rouhaud <rjuju123@gmail.com> writes: > On Thu, Jul 28, 2022 at 10:04:12AM -0400, Tom Lane wrote: >> If all supported versions do have home directories now, should we >> instead think about aligning the Windows behavior with everywhere >> else? > As far as I know the expected usage on Windows is still different. Even with > home directories application are still expected to put stuff in %APPDATA% (1), > in a dedicated directory. That's especially important since there is still no > concept of "hidden" files and the explorer still hides the extensions by > default. Ah. Yeah, if there's no convention about hiding files based on a leading "." then we definitely don't want to do that. regards, tom lane
-
Re: small windows psqlrc re-wording
Tom Lane <tgl@sss.pgh.pa.us> — 2022-09-07T17:10:11Z
After looking at the text more carefully, I thought it could use a deal more help than Robert has given it. I propose the attached. regards, tom lane
-
Re: small windows psqlrc re-wording
Julien Rouhaud <rjuju123@gmail.com> — 2022-09-08T07:46:10Z
On Wed, Sep 07, 2022 at 01:10:11PM -0400, Tom Lane wrote: > After looking at the text more carefully, I thought it could use > a deal more help than Robert has given it. I propose the attached. It looks good to me. - for example <filename>~/.psqlrc-9.2</filename> or - <filename>~/.psqlrc-9.2.5</filename>. The most specific + for example <filename>~/.psqlrc-15</filename> or + <filename>~/.psqlrc-15.2</filename>. The most specific This bit is a bit saddening. It's probably good to switch to the new 2 digits versioning but not trying to maintain it any further right? That being said, should the patch mention versions that at least currently exist, like -14 and -14.5?
-
Re: small windows psqlrc re-wording
Tom Lane <tgl@sss.pgh.pa.us> — 2022-09-08T15:02:49Z
Julien Rouhaud <rjuju123@gmail.com> writes: > On Wed, Sep 07, 2022 at 01:10:11PM -0400, Tom Lane wrote: > - for example <filename>~/.psqlrc-9.2</filename> or > - <filename>~/.psqlrc-9.2.5</filename>. The most specific > + for example <filename>~/.psqlrc-15</filename> or > + <filename>~/.psqlrc-15.2</filename>. The most specific > This bit is a bit saddening. It's probably good to switch to the new 2 digits > versioning but not trying to maintain it any further right? It occurred to me later to substitute &majorversion; and &version; like this: + for example <filename>~/.psqlrc-&majorversion;</filename> or + <filename>~/.psqlrc-&version;</filename>. The most specific On testing that in HEAD, I read Both the system-wide startup file and the user's personal startup file can be made psql-version-specific by appending a dash and the PostgreSQL major or minor release number to the file name, for example ~/.psqlrc-16 or ~/.psqlrc-16devel. That's a little confusing but it's actually accurate, because what process_psqlrc_file appends is the string PG_VERSION, so in a devel branch or beta release there's a non-numeric "minor release". I'm inclined to go ahead and do it like that. regards, tom lane -
Re: small windows psqlrc re-wording
Tom Lane <tgl@sss.pgh.pa.us> — 2022-09-09T17:52:49Z
I wrote: > On testing that in HEAD, I read > Both the system-wide startup file and the user's personal startup file > can be made psql-version-specific by appending a dash and the > PostgreSQL major or minor release number to the file name, for example > ~/.psqlrc-16 or ~/.psqlrc-16devel. > That's a little confusing but it's actually accurate, because what > process_psqlrc_file appends is the string PG_VERSION, so in a devel > branch or beta release there's a non-numeric "minor release". > I'm inclined to go ahead and do it like that. I decided that what I found jarring about that was the use of "release number" with a non-numeric version, so I changed it to "release identifier" and pushed. regards, tom lane
-
Re: small windows psqlrc re-wording
Robert Treat <rob@xzilla.net> — 2022-09-10T13:07:29Z
On Fri, Sep 9, 2022 at 1:52 PM Tom Lane <tgl@sss.pgh.pa.us> wrote: > > I wrote: > > On testing that in HEAD, I read > > > Both the system-wide startup file and the user's personal startup file > > can be made psql-version-specific by appending a dash and the > > PostgreSQL major or minor release number to the file name, for example > > ~/.psqlrc-16 or ~/.psqlrc-16devel. > > > That's a little confusing but it's actually accurate, because what > > process_psqlrc_file appends is the string PG_VERSION, so in a devel > > branch or beta release there's a non-numeric "minor release". > > I'm inclined to go ahead and do it like that. > > I decided that what I found jarring about that was the use of "release > number" with a non-numeric version, so I changed it to "release > identifier" and pushed. > Looks good. Thanks Tom / Julien. Robert Treat https://xzilla.net