Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit1bb5e78

Browse files
committed
Move code for managing PartitionDescs into a new file, partdesc.c
This is similar in spirit to the existing partbounds.c file in thesame directory, except that there's a lot less code in the new filecreated by this commit. Pending work in this area proposes to add abunch more code related to PartitionDescs, though, and this will giveus a good place to put it.Discussion:http://postgr.es/m/CA+TgmoZUwPf_uanjF==gTGBMJrn8uCq52XYvAEorNkLrUdoawg@mail.gmail.com
1 parent9eefba1 commit1bb5e78

File tree

17 files changed

+273
-218
lines changed

17 files changed

+273
-218
lines changed

‎src/backend/catalog/heap.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@
6969
#include"parser/parse_collate.h"
7070
#include"parser/parse_expr.h"
7171
#include"parser/parse_relation.h"
72+
#include"partitioning/partdesc.h"
7273
#include"storage/lmgr.h"
7374
#include"storage/predicate.h"
7475
#include"storage/smgr.h"

‎src/backend/catalog/partition.c‎

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -253,22 +253,6 @@ has_partition_attrs(Relation rel, Bitmapset *attnums, bool *used_in_expr)
253253
return false;
254254
}
255255

256-
/*
257-
* get_default_oid_from_partdesc
258-
*
259-
* Given a partition descriptor, return the OID of the default partition, if
260-
* one exists; else, return InvalidOid.
261-
*/
262-
Oid
263-
get_default_oid_from_partdesc(PartitionDescpartdesc)
264-
{
265-
if (partdesc&&partdesc->boundinfo&&
266-
partition_bound_has_default(partdesc->boundinfo))
267-
returnpartdesc->oids[partdesc->boundinfo->default_index];
268-
269-
returnInvalidOid;
270-
}
271-
272256
/*
273257
* get_default_partition_oid
274258
*

‎src/backend/catalog/pg_constraint.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
#include"catalog/dependency.h"
2525
#include"catalog/indexing.h"
2626
#include"catalog/objectaccess.h"
27-
#include"catalog/partition.h"
2827
#include"catalog/pg_constraint.h"
2928
#include"catalog/pg_operator.h"
3029
#include"catalog/pg_type.h"

‎src/backend/commands/indexcmds.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
#include"catalog/catalog.h"
2525
#include"catalog/index.h"
2626
#include"catalog/indexing.h"
27-
#include"catalog/partition.h"
2827
#include"catalog/pg_am.h"
2928
#include"catalog/pg_constraint.h"
3029
#include"catalog/pg_inherits.h"
@@ -46,6 +45,7 @@
4645
#include"parser/parse_coerce.h"
4746
#include"parser/parse_func.h"
4847
#include"parser/parse_oper.h"
48+
#include"partitioning/partdesc.h"
4949
#include"rewrite/rewriteManip.h"
5050
#include"storage/lmgr.h"
5151
#include"storage/proc.h"

‎src/backend/commands/tablecmds.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@
7474
#include"parser/parse_utilcmd.h"
7575
#include"parser/parser.h"
7676
#include"partitioning/partbounds.h"
77+
#include"partitioning/partdesc.h"
7778
#include"pgstat.h"
7879
#include"rewrite/rewriteDefine.h"
7980
#include"rewrite/rewriteHandler.h"

‎src/backend/commands/trigger.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
#include"parser/parse_func.h"
4343
#include"parser/parse_relation.h"
4444
#include"parser/parsetree.h"
45+
#include"partitioning/partdesc.h"
4546
#include"pgstat.h"
4647
#include"rewrite/rewriteManip.h"
4748
#include"storage/bufmgr.h"

‎src/backend/executor/execPartition.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
#include"miscadmin.h"
2525
#include"nodes/makefuncs.h"
2626
#include"partitioning/partbounds.h"
27+
#include"partitioning/partdesc.h"
2728
#include"partitioning/partprune.h"
2829
#include"rewrite/rewriteManip.h"
2930
#include"utils/lsyscache.h"

‎src/backend/optimizer/util/inherit.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
#include"optimizer/inherit.h"
2424
#include"optimizer/planner.h"
2525
#include"optimizer/prep.h"
26+
#include"partitioning/partdesc.h"
2627
#include"utils/rel.h"
2728

2829

‎src/backend/optimizer/util/plancat.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
#include"catalog/catalog.h"
2828
#include"catalog/dependency.h"
2929
#include"catalog/heap.h"
30-
#include"catalog/partition.h"
3130
#include"catalog/pg_am.h"
3231
#include"catalog/pg_proc.h"
3332
#include"catalog/pg_statistic_ext.h"
@@ -41,6 +40,7 @@
4140
#include"optimizer/plancat.h"
4241
#include"optimizer/prep.h"
4342
#include"partitioning/partbounds.h"
43+
#include"partitioning/partdesc.h"
4444
#include"parser/parse_relation.h"
4545
#include"parser/parsetree.h"
4646
#include"rewrite/rewriteManip.h"

‎src/backend/partitioning/Makefile‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@ subdir = src/backend/partitioning
1212
top_builddir = ../../..
1313
include$(top_builddir)/src/Makefile.global
1414

15-
OBJS =partprune.opartbounds.o
15+
OBJS =partbounds.opartdesc.o partprune.o
1616

1717
include$(top_srcdir)/src/backend/common.mk

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp