Inaccurate comment for pg_get_partkeydef

Started by Japin Lialmost 3 years ago3 messages
#1Japin Li
japinli@hotmail.com
1 attachment(s)

PSA patch to fix a comment inaccurate.

--
Regrads,
Japin Li.
ChengDu WenWu Information Technology Co.,Ltd.

Attachments:

fix-pg_get_partkeydef-comment.patchtext/x-diffDownload
diff --git a/src/backend/utils/adt/ruleutils.c b/src/backend/utils/adt/ruleutils.c
index 6dc117dea8..bcb493b56c 100644
--- a/src/backend/utils/adt/ruleutils.c
+++ b/src/backend/utils/adt/ruleutils.c
@@ -1855,7 +1855,7 @@ pg_get_statisticsobjdef_expressions(PG_FUNCTION_ARGS)
  *
  * Returns the partition key specification, ie, the following:
  *
- * PARTITION BY { RANGE | LIST | HASH } (column opt_collation opt_opclass [, ...])
+ * { RANGE | LIST | HASH } (column opt_collation opt_opclass [, ...])
  */
 Datum
 pg_get_partkeydef(PG_FUNCTION_ARGS)
#2Ashutosh Bapat
ashutosh.bapat.oss@gmail.com
In reply to: Japin Li (#1)
Re: Inaccurate comment for pg_get_partkeydef

Looks good to me. Fixed according to the actual output.

select pg_get_partkeydef('prt1'::regclass);
pg_get_partkeydef
-------------------
RANGE (a)
(1 row)

bdrdemo@342511=#\d+ prt1
Partitioned table "public.prt1"
Column | Type | Collation | Nullable | Default | Storage |
Compression | Stats target | Description
--------+---------+-----------+----------+---------+---------+-------------+--------------+-------------
a | integer | | not null | | plain |
| |
b | integer | | | | plain |
| |
Partition key: RANGE (a)
Indexes:
"prt1_pkey" PRIMARY KEY, btree (a)
"prt1_b" btree (b)
Partitions: prt1_p1 FOR VALUES FROM (0) TO (10),
prt1_p2 FOR VALUES FROM (10) TO (20),
prt1_default DEFAULT

On Mon, Mar 6, 2023 at 11:24 AM Japin Li <japinli@hotmail.com> wrote:

PSA patch to fix a comment inaccurate.

--
Regrads,
Japin Li.
ChengDu WenWu Information Technology Co.,Ltd.

--
Best Wishes,
Ashutosh Bapat

#3David Rowley
dgrowleyml@gmail.com
In reply to: Japin Li (#1)
Re: Inaccurate comment for pg_get_partkeydef

On Mon, 6 Mar 2023 at 18:54, Japin Li <japinli@hotmail.com> wrote:

PSA patch to fix a comment inaccurate.

Thanks. Pushed.

David