postgresql/src/backend/catalog
Andres Freund 1a0586de36 Introduce notion of different types of slots (without implementing them).
Upcoming work intends to allow pluggable ways to introduce new ways of
storing table data. Accessing those table access methods from the
executor requires TupleTableSlots to be carry tuples in the native
format of such storage methods; otherwise there'll be a significant
conversion overhead.

Different access methods will require different data to store tuples
efficiently (just like virtual, minimal, heap already require fields
in TupleTableSlot). To allow that without requiring additional pointer
indirections, we want to have different structs (embedding
TupleTableSlot) for different types of slots.  Thus different types of
slots are needed, which requires adapting creators of slots.

The slot that most efficiently can represent a type of tuple in an
executor node will often depend on the type of slot a child node
uses. Therefore we need to track the type of slot is returned by
nodes, so parent slots can create slots based on that.

Relatedly, JIT compilation of tuple deforming needs to know which type
of slot a certain expression refers to, so it can create an
appropriate deforming function for the type of tuple in the slot.

But not all nodes will only return one type of slot, e.g. an append
node will potentially return different types of slots for each of its
subplans.

Therefore add function that allows to query the type of a node's
result slot, and whether it'll always be the same type (whether it's
fixed). This can be queried using ExecGetResultSlotOps().

The scan, result, inner, outer type of slots are automatically
inferred from ExecInitScanTupleSlot(), ExecInitResultSlot(),
left/right subtrees respectively. If that's not correct for a node,
that can be overwritten using new fields in PlanState.

This commit does not introduce the actually abstracted implementation
of different kind of TupleTableSlots, that will be left for a followup
commit.  The different types of slots introduced will, for now, still
use the same backing implementation.

While this already partially invalidates the big comment in
tuptable.h, it seems to make more sense to update it later, when the
different TupleTableSlot implementations actually exist.

Author: Ashutosh Bapat and Andres Freund, with changes by Amit Khandekar
Discussion: https://postgr.es/m/20181105210039.hh4vvi4vwoq5ba2q@alap3.anarazel.de
2018-11-15 22:00:30 -08:00
..
.gitignore Replace our traditional initial-catalog-data format with a better design. 2018-04-08 13:17:27 -04:00
Catalog.pm Add a "return" statement to pacify perlcritic. 2018-09-20 16:10:23 -04:00
Makefile Rearrange makefile rules for running Gen_fmgrtab.pl. 2018-05-03 17:54:18 -04:00
aclchk.c Fix missing role dependencies for some schema and type ACLs. 2018-11-09 20:42:14 -05:00
catalog.c Add toast tables to most system catalogs 2018-07-20 07:43:41 +09:00
dependency.c Create an RTE field to record the query's lock mode for each relation. 2018-09-30 13:55:51 -04:00
genbki.pl Teach genbki.pl to auto-generate pg_type entries for array types. 2018-09-20 15:14:46 -04:00
heap.c Fix missing role dependencies for some schema and type ACLs. 2018-11-09 20:42:14 -05:00
index.c Introduce notion of different types of slots (without implementing them). 2018-11-15 22:00:30 -08:00
indexing.c Introduce notion of different types of slots (without implementing them). 2018-11-15 22:00:30 -08:00
information_schema.sql Add prokind column, replacing proisagg and proiswindow 2018-03-02 13:48:33 -05:00
namespace.c Clarify comment about assignment and reset of temp namespace ID in MyProc 2018-08-21 08:32:18 +09:00
objectaccess.c Update copyright for 2018 2018-01-02 23:30:12 -05:00
objectaddress.c Refactor routines for subscription and publication lookups 2018-09-18 12:00:18 +09:00
partition.c Post-feature-freeze pgindent run. 2018-04-26 14:47:16 -04:00
pg_aggregate.c Fix type checking for support functions of parallel VARIADIC aggregates. 2018-05-15 15:06:53 -04:00
pg_collation.c Merge catalog/pg_foo_fn.h headers back into pg_foo.h headers. 2018-04-08 14:35:29 -04:00
pg_constraint.c Remove obsolete pg_constraint.consrc column 2018-11-01 20:36:05 +01:00
pg_conversion.c Merge catalog/pg_foo_fn.h headers back into pg_foo.h headers. 2018-04-08 14:35:29 -04:00
pg_db_role_setting.c Update copyright for 2018 2018-01-02 23:30:12 -05:00
pg_depend.c Local partitioned indexes 2018-01-19 11:49:22 -03:00
pg_enum.c Relax transactional restrictions on ALTER TYPE ... ADD VALUE (redux). 2018-10-09 12:51:01 +13:00
pg_inherits.c Post-feature-freeze pgindent run. 2018-04-26 14:47:16 -04:00
pg_largeobject.c Update copyright for 2018 2018-01-02 23:30:12 -05:00
pg_namespace.c Fix missing role dependencies for some schema and type ACLs. 2018-11-09 20:42:14 -05:00
pg_operator.c Merge catalog/pg_foo_fn.h headers back into pg_foo.h headers. 2018-04-08 14:35:29 -04:00
pg_proc.c Fix missing role dependencies for some schema and type ACLs. 2018-11-09 20:42:14 -05:00
pg_publication.c Refactor routines for subscription and publication lookups 2018-09-18 12:00:18 +09:00
pg_range.c Update copyright for 2018 2018-01-02 23:30:12 -05:00
pg_shdepend.c Update copyright for 2018 2018-01-02 23:30:12 -05:00
pg_subscription.c Refactor routines for subscription and publication lookups 2018-09-18 12:00:18 +09:00
pg_type.c Fix missing role dependencies for some schema and type ACLs. 2018-11-09 20:42:14 -05:00
sql_feature_packages.txt > I have installed your patch and adjusted the names of the standards 2004-12-02 22:51:28 +00:00
sql_features.txt Update SQL features list 2018-05-21 15:29:22 -04:00
storage.c Further cleanup of client dependencies on src/include/catalog headers. 2018-04-09 14:39:58 -04:00
system_views.sql Switch pg_promote to be parallel-safe 2018-11-06 14:11:21 +09:00
toasting.c Rename IndexInfo.ii_KeyAttrNumbers array 2018-04-12 13:02:45 +03:00