Forbid referencing columns by names in ALTER INDEX ... SET STATISTICS

From: Yugo Nagata <nagata(at)sraoss(dot)co(dot)jp>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Forbid referencing columns by names in ALTER INDEX ... SET STATISTICS
Date: 2018-06-27 13:22:29
Message-ID: 20180627222229.7425f272.nagata@sraoss.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

According to the syntax in ALTER INDEX doc, a column should be specified by
column number as discussed in [1]. However, the current code still allows to
use an internal column name like "expr". Is this intentional?

Although it is harmless, how about forbiding this undocumented and
unuseful behavior. The attached patch does it.

[1] https://www.postgresql.org/message-id/CAPpHfdsSYo6xpt0F%3DngAdqMPFJJhC7zApde9h1qwkdpHpwFisA%40mail.gmail.com

--
Yugo Nagata <nagata(at)sraoss(dot)co(dot)jp>

Attachment Content-Type Size
forbid_expr_index_col_by_name.patch text/x-diff 771 bytes

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jonathan Lemig 2018-06-27 14:09:46 Re: Name of main process differs between servers (postmaster vs postgres)
Previous Message Ashutosh Bapat 2018-06-27 13:21:50 Re: [HACKERS] advanced partition matching algorithm for partition-wise join