Re: Typo in psql doc

2021-04-14 Thread Tom Lane
Michael Paquier  writes:
> On Tue, Apr 13, 2021 at 07:57:54AM +, 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




INCLUDING COMPRESSION

2021-04-14 Thread Fujii Masao

The syntax for like_option in CREATE TABLE docs seems to forget to mention
INCLUDING COMPRESSION option. I think the following fix is necessary.
Patch attached.

-{ INCLUDING | EXCLUDING } { COMMENTS | CONSTRAINTS | DEFAULTS | GENERATED | 
IDENTITY | INDEXES | STATISTICS | STORAGE | ALL }
+{ INCLUDING | EXCLUDING } { COMMENTS | COMPRESSION | CONSTRAINTS | DEFAULTS | 
GENERATED | IDENTITY | INDEXES | STATISTICS | STORAGE | ALL }

Regards,

--
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION
diff --git a/doc/src/sgml/ref/create_table.sgml 
b/doc/src/sgml/ref/create_table.sgml
index b6cf9adcb2..a8c5e4028a 100644
--- a/doc/src/sgml/ref/create_table.sgml
+++ b/doc/src/sgml/ref/create_table.sgml
@@ -87,7 +87,7 @@ class="parameter">referential_action ] [ ON 
UPDATE and like_option 
is:
 
-{ INCLUDING | EXCLUDING } { COMMENTS | CONSTRAINTS | DEFAULTS | GENERATED | 
IDENTITY | INDEXES | STATISTICS | STORAGE | ALL }
+{ INCLUDING | EXCLUDING } { COMMENTS | COMPRESSION | CONSTRAINTS | DEFAULTS | 
GENERATED | IDENTITY | INDEXES | STATISTICS | STORAGE | ALL }
 
 and partition_bound_spec 
is:
 


Re: Typo in psql doc

2021-04-14 Thread Michael Paquier
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


signature.asc
Description: PGP signature


Re: INCLUDING COMPRESSION

2021-04-14 Thread Michael Paquier
On Wed, Apr 14, 2021 at 11:46:58PM +0900, Fujii Masao wrote:
> The syntax for like_option in CREATE TABLE docs seems to forget to mention
> INCLUDING COMPRESSION option. I think the following fix is necessary.
> Patch attached.
> 
> -{ INCLUDING | EXCLUDING } { COMMENTS | CONSTRAINTS | DEFAULTS | GENERATED | 
> IDENTITY | INDEXES | STATISTICS | STORAGE | ALL }
> +{ INCLUDING | EXCLUDING } { COMMENTS | COMPRESSION | CONSTRAINTS | DEFAULTS 
> | GENERATED | IDENTITY | INDEXES | STATISTICS | STORAGE | ALL }

Indeed.  May I ask at the same time why gram.y (TableLikeOption) and
parsenodes.h (CREATE_TABLE_LIKE_COMPRESSION) don't classify this new
option in alphabetical order with the rest?  Ordering them makes
easier a review of them.
--
Michael


signature.asc
Description: PGP signature