mirror of
				https://github.com/postgres/postgres.git
				synced 2025-11-03 09:13:20 +03:00 
			
		
		
		
	Allow a partitioned table to have a default partition.
Any tuples that don't route to any other partition will route to the default partition. Jeevan Ladhe, Beena Emerson, Ashutosh Bapat, Rahila Syed, and Robert Haas, with review and testing at various stages by (at least) Rushabh Lathia, Keith Fiske, Amit Langote, Amul Sul, Rajkumar Raghuanshi, Sven Kunze, Kyotaro Horiguchi, Thom Brown, Rafia Sabih, and Dilip Kumar. Discussion: http://postgr.es/m/CAH2L28tbN4SYyhS7YV1YBWcitkqbhSWfQCy0G=apRcC_PEO-bg@mail.gmail.com Discussion: http://postgr.es/m/CAOG9ApEYj34fWMcvBMBQ-YtqR9fTdXhdN82QEKG0SVZ6zeL1xg@mail.gmail.com
This commit is contained in:
		@@ -4450,6 +4450,7 @@ _copyPartitionBoundSpec(const PartitionBoundSpec *from)
 | 
			
		||||
	PartitionBoundSpec *newnode = makeNode(PartitionBoundSpec);
 | 
			
		||||
 | 
			
		||||
	COPY_SCALAR_FIELD(strategy);
 | 
			
		||||
	COPY_SCALAR_FIELD(is_default);
 | 
			
		||||
	COPY_NODE_FIELD(listdatums);
 | 
			
		||||
	COPY_NODE_FIELD(lowerdatums);
 | 
			
		||||
	COPY_NODE_FIELD(upperdatums);
 | 
			
		||||
 
 | 
			
		||||
@@ -2839,6 +2839,7 @@ static bool
 | 
			
		||||
_equalPartitionBoundSpec(const PartitionBoundSpec *a, const PartitionBoundSpec *b)
 | 
			
		||||
{
 | 
			
		||||
	COMPARE_SCALAR_FIELD(strategy);
 | 
			
		||||
	COMPARE_SCALAR_FIELD(is_default);
 | 
			
		||||
	COMPARE_NODE_FIELD(listdatums);
 | 
			
		||||
	COMPARE_NODE_FIELD(lowerdatums);
 | 
			
		||||
	COMPARE_NODE_FIELD(upperdatums);
 | 
			
		||||
 
 | 
			
		||||
@@ -3573,6 +3573,7 @@ _outPartitionBoundSpec(StringInfo str, const PartitionBoundSpec *node)
 | 
			
		||||
	WRITE_NODE_TYPE("PARTITIONBOUNDSPEC");
 | 
			
		||||
 | 
			
		||||
	WRITE_CHAR_FIELD(strategy);
 | 
			
		||||
	WRITE_BOOL_FIELD(is_default);
 | 
			
		||||
	WRITE_NODE_FIELD(listdatums);
 | 
			
		||||
	WRITE_NODE_FIELD(lowerdatums);
 | 
			
		||||
	WRITE_NODE_FIELD(upperdatums);
 | 
			
		||||
 
 | 
			
		||||
@@ -2390,6 +2390,7 @@ _readPartitionBoundSpec(void)
 | 
			
		||||
	READ_LOCALS(PartitionBoundSpec);
 | 
			
		||||
 | 
			
		||||
	READ_CHAR_FIELD(strategy);
 | 
			
		||||
	READ_BOOL_FIELD(is_default);
 | 
			
		||||
	READ_NODE_FIELD(listdatums);
 | 
			
		||||
	READ_NODE_FIELD(lowerdatums);
 | 
			
		||||
	READ_NODE_FIELD(upperdatums);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user