11.7. Indexes on Expressions

2020-04-10 Thread PG Doc comments form
The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/12/indexes-expressional.html
Description:

It appears as if the paragraph beginning: "If we were to declare this index
UNIQUE..."

actually belongs just before the paragraph beginning: "Expression indexes
also allow control over..."

as it appears to pertain to the previous example block.


Difference options with the CREATE ROLE docs

2020-04-10 Thread PG Doc comments form
The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/12/sql-creategroup.html
Description:

Hello,
This page says that "CREATE GROUP is now an alias for CREATE ROLE.",
But when u check the CREATE ROLE, u see they have different options,
I don't know if this is on purpose or not, But if it's just an alias, then
they should have the same options
If it's not the "exact same", then I guess there should be some explanations
about it
Thanks


Re: Difference options with the CREATE ROLE docs

2020-04-10 Thread Euler Taveira
On Fri, 10 Apr 2020 at 08:19, PG Doc comments form 
wrote:

>
> This page says that "CREATE GROUP is now an alias for CREATE ROLE.",
> But when u check the CREATE ROLE, u see they have different options,
> I don't know if this is on purpose or not, But if it's just an alias, then
> they should have the same options
> If it's not the "exact same", then I guess there should be some
> explanations
> about it
>
> It seems an oversight. I'm attaching patches to fix it in all supported
branches. v11 can be applied cleanly to v12/master.

Regards,


-- 
Euler Taveira http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
From df6932ec195d009cdb62e9f33680aff03e33dc93 Mon Sep 17 00:00:00 2001
From: Euler Taveira 
Date: Fri, 10 Apr 2020 10:29:30 -0300
Subject: [PATCH] Sync CREATE ROLE and CREATE GROUP synopsis

Since CREATE GROUP is an alias to CREATE ROLE, they should provide the
same options.

Discussion: https://www.postgresql.org/message-id/158647836143.655.9853963229391401576%40wrigleys.postgresql.org
---
 doc/src/sgml/ref/create_group.sgml | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/doc/src/sgml/ref/create_group.sgml b/doc/src/sgml/ref/create_group.sgml
index 158617cb93..ebdfec9b50 100644
--- a/doc/src/sgml/ref/create_group.sgml
+++ b/doc/src/sgml/ref/create_group.sgml
@@ -30,6 +30,9 @@ CREATE GROUP name [ [ WITH ] connlimit
 | [ ENCRYPTED ] PASSWORD 'password'
 | VALID UNTIL 'timestamp'
 | IN ROLE role_name [, ...]
-- 
2.20.1

From 7c732f4bc971a6b431bb9462340cd5b91f6ee957 Mon Sep 17 00:00:00 2001
From: Euler Taveira 
Date: Fri, 10 Apr 2020 10:39:34 -0300
Subject: [PATCH] Sync CREATE ROLE and CREATE GROUP synopsis

Since CREATE GROUP is an alias to CREATE ROLE, they should provide the
same options.

Discussion: https://www.postgresql.org/message-id/158647836143.655.9853963229391401576%40wrigleys.postgresql.org
---
 doc/src/sgml/ref/create_group.sgml | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/doc/src/sgml/ref/create_group.sgml b/doc/src/sgml/ref/create_group.sgml
index 981ce51e5f..11034a126a 100644
--- a/doc/src/sgml/ref/create_group.sgml
+++ b/doc/src/sgml/ref/create_group.sgml
@@ -31,6 +31,9 @@ CREATE GROUP name [ [ WITH ] connlimit
 | [ ENCRYPTED | UNENCRYPTED ] PASSWORD 'password'
 | VALID UNTIL 'timestamp'
 | IN ROLE role_name [, ...]
-- 
2.20.1

From 46729fbd2b35a44c4d15259b446e818aa86a6c5d Mon Sep 17 00:00:00 2001
From: Euler Taveira 
Date: Fri, 10 Apr 2020 10:36:53 -0300
Subject: [PATCH] Sync CREATE ROLE and CREATE GROUP synopsis

Since CREATE GROUP is an alias to CREATE ROLE, they should provide the
same options.

Discussion: https://www.postgresql.org/message-id/158647836143.655.9853963229391401576%40wrigleys.postgresql.org
---
 doc/src/sgml/ref/create_group.sgml | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/doc/src/sgml/ref/create_group.sgml b/doc/src/sgml/ref/create_group.sgml
index 1d5cc9b596..1a21f0bc87 100644
--- a/doc/src/sgml/ref/create_group.sgml
+++ b/doc/src/sgml/ref/create_group.sgml
@@ -30,6 +30,9 @@ CREATE GROUP name [ [ WITH ] connlimit
 | [ ENCRYPTED | UNENCRYPTED ] PASSWORD 'password'
 | VALID UNTIL 'timestamp'
 | IN ROLE role_name [, ...]
-- 
2.20.1

From ddaeeaf6e3e2a1545bfa47189766c18e501c1826 Mon Sep 17 00:00:00 2001
From: Euler Taveira 
Date: Fri, 10 Apr 2020 10:21:10 -0300
Subject: [PATCH] Sync CREATE ROLE and CREATE GROUP synopsis

Since CREATE GROUP is an alias to CREATE ROLE, they should provide the
same options.

Discussion: https://www.postgresql.org/message-id/158647836143.655.9853963229391401576%40wrigleys.postgresql.org
---
 doc/src/sgml/ref/create_group.sgml | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/doc/src/sgml/ref/create_group.sgml b/doc/src/sgml/ref/create_group.sgml
index 1b8e76e326..d124c98eb5 100644
--- a/doc/src/sgml/ref/create_group.sgml
+++ b/doc/src/sgml/ref/create_group.sgml
@@ -30,7 +30,10 @@ CREATE GROUP name [ [ WITH ] password'
+| REPLICATION | NOREPLICATION
+| BYPASSRLS | NOBYPASSRLS
+| CONNECTION LIMIT connlimit
+| [ ENCRYPTED ] PASSWORD 'password' | PASSWORD NULL
 | VALID UNTIL 'timestamp'
 | IN ROLE role_name [, ...]
 | IN GROUP role_name [, ...]
-- 
2.20.1



Re: Difference options with the CREATE ROLE docs

2020-04-10 Thread Tom Lane
PG Doc comments form  writes:
> This page says that "CREATE GROUP is now an alias for CREATE ROLE.",
> But when u check the CREATE ROLE, u see they have different options,

The implementations are the same, as you could easily find by experiment.
Looks like people have been sloppy about updating the manual page for
CREATE GROUP though :-(.  Will fix, thanks for the report!

regards, tom lane




Re: 11.7. Indexes on Expressions

2020-04-10 Thread Tom Lane
PG Doc comments form  writes:
> Page: https://www.postgresql.org/docs/12/indexes-expressional.html

> It appears as if the paragraph beginning: "If we were to declare this index
> UNIQUE..."
> actually belongs just before the paragraph beginning: "Expression indexes
> also allow control over..."
> as it appears to pertain to the previous example block.

Yeah, I agree, somebody was sloppy about inserting a new paragraph.
Will fix, thanks for the report!

regards, tom lane




Re: Difference options with the CREATE ROLE docs

2020-04-10 Thread Tom Lane
Euler Taveira  writes:
> It seems an oversight. I'm attaching patches to fix it in all supported
> branches. v11 can be applied cleanly to v12/master.

Ah, I'd already done this before seeing your response :-(

regards, tom lane




The line `This syntax is not as commonly used as the one above, but we show it here...`

2020-04-10 Thread PG Doc comments form
The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/12/tutorial-join.html
Description:

Actually, it is good practice to avoid using 'cross joins' and use the
'inner join' syntax.  Most query planners might optimize both queries to run
the same plan, but the inner join reflects intent and is clearer and is
preferred in production code.