public inbox for [email protected]help / color / mirror / Atom feed
Typo in psql doc 6+ messages / 4 participants [nested] [flat]
* Typo in psql doc @ 2021-04-13 07:57 PG Doc comments form <[email protected]> 0 siblings, 1 reply; 6+ messages in thread From: PG Doc comments form @ 2021-04-13 07:57 UTC (permalink / raw) To: [email protected]; +Cc: [email protected] The following documentation comment has been logged on the website: Page: https://www.postgresql.org/docs/13/app-psql.html Description: There is a spurious space inside the documentation: \set HISTFILE ~/.psql_history- :DBNAME instead of \set HISTFILE ~/.psql_history-:DBNAME ^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Typo in psql doc @ 2021-04-14 05:58 Michael Paquier <[email protected]> parent: PG Doc comments form <[email protected]> 0 siblings, 2 replies; 6+ messages in thread From: Michael Paquier @ 2021-04-14 05:58 UTC (permalink / raw) To: [email protected]; [email protected] On Tue, Apr 13, 2021 at 07:57:54AM +0000, PG Doc comments form wrote: > There is a spurious space inside the documentation: > \set HISTFILE ~/.psql_history- :DBNAME > instead of > \set HISTFILE ~/.psql_history-:DBNAME Both commands sey in your .psqlrc results in the same path being used, as I guess that psqlscanslash.l eats all the whitespaces in-between. So the documentation is not wrong here (see also commit e4c7619). -- Michael Attachments: [application/pgp-signature] signature.asc (833B, 2-signature.asc) download ^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Typo in psql doc @ 2021-04-14 14:12 Tom Lane <[email protected]> parent: Michael Paquier <[email protected]> 1 sibling, 1 reply; 6+ messages in thread From: Tom Lane @ 2021-04-14 14:12 UTC (permalink / raw) To: Michael Paquier <[email protected]>; +Cc: [email protected]; [email protected] Michael Paquier <[email protected]> writes: > On Tue, Apr 13, 2021 at 07:57:54AM +0000, PG Doc comments form wrote: >> There is a spurious space inside the documentation: >> \set HISTFILE ~/.psql_history- :DBNAME >> instead of >> \set HISTFILE ~/.psql_history-:DBNAME > Both commands sey in your .psqlrc results in the same path being > used, as I guess that psqlscanslash.l eats all the whitespaces > in-between. So the documentation is not wrong here (see also commit > e4c7619). I think that e4c7619 may have been working around a since-fixed limitation in variable expansion. [experiments ...] Ah, looks like this behavior changed in 9.2, which is later than I would've guessed: psql (9.1.24) Type "help" for help. regression=# \set FOO bar-:DBNAME regression=# \echo :FOO bar-:DBNAME psql (9.2.24) Type "help" for help. regression=# \set FOO bar-:DBNAME regression=# \echo :FOO bar-regression As you say, both ways now give the same result. Since it's not the point of this example to illustrate \set's space-eating behavior, it might be clearer to revert the addition of the space. regards, tom lane ^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Typo in psql doc @ 2021-04-15 01:48 Michael Paquier <[email protected]> parent: Tom Lane <[email protected]> 0 siblings, 0 replies; 6+ messages in thread From: Michael Paquier @ 2021-04-15 01:48 UTC (permalink / raw) To: Tom Lane <[email protected]>; +Cc: [email protected]; [email protected] On Wed, Apr 14, 2021 at 10:12:02AM -0400, Tom Lane wrote: > As you say, both ways now give the same result. Since it's not the > point of this example to illustrate \set's space-eating behavior, > it might be clearer to revert the addition of the space. Oh, interesting point. I did not notice that this was different before. -- Michael Attachments: [application/pgp-signature] signature.asc (833B, 2-signature.asc) download ^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Typo in psql doc @ 2021-04-15 07:55 Ludovic Kuty <[email protected]> parent: Michael Paquier <[email protected]> 1 sibling, 1 reply; 6+ messages in thread From: Ludovic Kuty @ 2021-04-15 07:55 UTC (permalink / raw) To: Michael Paquier <[email protected]>; +Cc: [email protected] Yes indeed, thanks. I re-tested the example this morning and it worked correctly with the space. I guess I had messed up things when I first tried it. > Michael Paquier <mailto:[email protected]> > 14 April 2021 at 07:58 > > Both commands sey in your .psqlrc results in the same path being > used, as I guess that psqlscanslash.l eats all the whitespaces > in-between. So the documentation is not wrong here (see also commit > e4c7619). > -- > Michael > PG Doc comments form <mailto:[email protected]> > 13 April 2021 at 09:57 > The following documentation comment has been logged on the website: > > Page: https://www.postgresql.org/docs/13/app-psql.html > Description: > > There is a spurious space inside the documentation: > \set HISTFILE ~/.psql_history- :DBNAME > instead of > \set HISTFILE ~/.psql_history-:DBNAME ^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Typo in psql doc @ 2021-04-15 08:02 Michael Paquier <[email protected]> parent: Ludovic Kuty <[email protected]> 0 siblings, 0 replies; 6+ messages in thread From: Michael Paquier @ 2021-04-15 08:02 UTC (permalink / raw) To: Ludovic Kuty <[email protected]>; +Cc: [email protected] On Thu, Apr 15, 2021 at 09:55:53AM +0200, Ludovic Kuty wrote: > Yes indeed, thanks. I re-tested the example this morning and it worked > correctly with the space. I guess I had messed up things when I first tried > it. After seeing Tom's argument that this behavior become more consistent in 9.2, and that e4c7619 introduced it initially because of what ~9.1 was doing, I have considered both points and just applied a small patch for HEAD with 1840d9f to remove the space. -- Michael Attachments: [application/pgp-signature] signature.asc (833B, 2-signature.asc) download ^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2021-04-15 08:02 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2021-04-13 07:57 Typo in psql doc PG Doc comments form <[email protected]> 2021-04-14 05:58 ` Michael Paquier <[email protected]> 2021-04-14 14:12 ` Tom Lane <[email protected]> 2021-04-15 01:48 ` Michael Paquier <[email protected]> 2021-04-15 07:55 ` Ludovic Kuty <[email protected]> 2021-04-15 08:02 ` Michael Paquier <[email protected]>
This inbox is served by agora; see mirroring instructions for how to clone and mirror all data and code used for this inbox