diff options
| author | Robert Haas | 2018-01-04 21:25:49 +0000 |
|---|---|---|
| committer | Robert Haas | 2018-01-04 21:25:49 +0000 |
| commit | ef6087ee5fa84206dc24ba1339e229354b05cf2a (patch) | |
| tree | c9e9126a3b971adbb19d9245d02f6e4de3fcaada /src/include | |
| parent | ac3ff8b1d8f98da38c53a701e6397931080a39cf (diff) | |
Minor preparatory refactoring for UPDATE row movement.
Generalize is_partition_attr to has_partition_attrs and make it
accessible from outside tablecmds.c. Change map_partition_varattnos
to clarify that it can be used for mapping between any two relations
in a partitioning hierarchy, not just parent -> child.
Amit Khandekar, reviewed by Amit Langote, David Rowley, and me.
Some comment changes by me.
Discussion: http://postgr.es/m/CAJ3gD9fWfxgKC+PfJZF3hkgAcNOy-LpfPxVYitDEXKHjeieWQQ@mail.gmail.com
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/catalog/partition.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/include/catalog/partition.h b/src/include/catalog/partition.h index ea0f549c9a4..2faf0ca26e9 100644 --- a/src/include/catalog/partition.h +++ b/src/include/catalog/partition.h @@ -54,11 +54,13 @@ extern void check_new_partition_bound(char *relname, Relation parent, extern Oid get_partition_parent(Oid relid); extern List *get_qual_from_partbound(Relation rel, Relation parent, PartitionBoundSpec *spec); -extern List *map_partition_varattnos(List *expr, int target_varno, - Relation partrel, Relation parent, +extern List *map_partition_varattnos(List *expr, int fromrel_varno, + Relation to_rel, Relation from_rel, bool *found_whole_row); extern List *RelationGetPartitionQual(Relation rel); extern Expr *get_partition_qual_relid(Oid relid); +extern bool has_partition_attrs(Relation rel, Bitmapset *attnums, + bool *used_in_expr); extern Oid get_default_oid_from_partdesc(PartitionDesc partdesc); extern Oid get_default_partition_oid(Oid parentId); |
