Re: ALTER INDEX .. SET STATISTICS ... behaviour

From: Adrien Nayrat <adrien(dot)nayrat(at)dalibo(dot)com>
To: Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: ALTER INDEX .. SET STATISTICS ... behaviour
Date: 2017-09-04 12:57:08
Message-ID: a519b346-21d7-c6b5-f7d0-5d61a038c7bf@dalibo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 08/30/2017 02:26 PM, Alexander Korotkov wrote:
> Patch rebased to current master is attached.

Hello,

I reviewed this patch. It works as expected but I have few remarks :

* There is a warning during compilation :

gram.y: In function ‘base_yyparse’:
gram.y:2090:6: warning: ISO C90 forbids mixed declarations and code
[-Wdeclaration-after-statement]
AlterTableCmd *n = makeNode(AlterTableCmd);
^~~~~~~~~~~~~

If I understand we should declare AlterTableCmd *n [...] before "if"?

* I propose to add "Stats target" information in psql verbose output command
\d+ (patch attached with test)

\d+ tmp_idx
Index "public.tmp_idx"
Column | Type | Definition | Storage | Stats target
--------+------------------+------------+---------+--------------
a | integer | a | plain |
expr | double precision | (d + e) | plain | 1000
b | cstring | b | plain |
btree, for table "public.tmp"

* psql completion is missing (added to previous patch)

Regards,

--
Adrien NAYRAT

http://dalibo.com - http://dalibo.org

Attachment Content-Type Size
alter_index.patch text/x-patch 4.1 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2017-09-04 13:27:11 Re: pg_basebackup throttling doesn't throttle as promised
Previous Message Ashutosh Bapat 2017-09-04 12:52:17 Re: dropping partitioned tables without CASCADE