Re: remove unnecessary include in src/backend/commands/policy.c - Mailing list pgsql-hackers

From Chao Li
Subject Re: remove unnecessary include in src/backend/commands/policy.c
Date
Msg-id 57D0C286-1BA5-4E40-AF26-A3949D0330BD@gmail.com
Whole thread Raw
In response to remove unnecessary include in src/backend/commands/policy.c  (jian he <jian.universality@gmail.com>)
List pgsql-hackers


On Sep 14, 2025, at 14:37, jian he <jian.universality@gmail.com> wrote:

hi.

in src/backend/commands/policy.c, i found that
#include "access/htup.h"
#include "access/htup_details.h"
#include "catalog/catalog.h"
#include "nodes/pg_list.h"
#include "parser/parse_node.h"
#include "utils/array.h"

is not necessary "include", so I removed it.

we can also remove
#include "access/relation.h"
replace relation_open to table_open, since we already did relkind check in
RangeVarCallbackForPolicy.
<v1-0001-remove-unnecessary-include-in-policy.c.patch>

LGTM. I built the patch on MacOS M4, and build passed without warning.

Best regards,
--
Chao Li (Evan)
HighGo Software Co., Ltd.
https://www.highgo.com/




pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: plan shape work
Next
From: Peter Smith
Date:
Subject: Re: Add support for specifying tables in pg_createsubscriber.