mirror of
				https://github.com/postgres/postgres.git
				synced 2025-10-31 10:30:33 +03:00 
			
		
		
		
	Foreign keys on partitioned tables
Author: Álvaro Herrera Discussion: https://postgr.es/m/20171231194359.cvojcour423ulha4@alvherre.pgsql Reviewed-by: Peter Eisentraut
This commit is contained in:
		| @@ -749,12 +749,6 @@ transformColumnDefinition(CreateStmtContext *cxt, ColumnDef *column) | ||||
| 							 errmsg("foreign key constraints are not supported on foreign tables"), | ||||
| 							 parser_errposition(cxt->pstate, | ||||
| 												constraint->location))); | ||||
| 				if (cxt->ispartitioned) | ||||
| 					ereport(ERROR, | ||||
| 							(errcode(ERRCODE_FEATURE_NOT_SUPPORTED), | ||||
| 							 errmsg("foreign key constraints are not supported on partitioned tables"), | ||||
| 							 parser_errposition(cxt->pstate, | ||||
| 												constraint->location))); | ||||
|  | ||||
| 				/* | ||||
| 				 * Fill in the current attribute's name and throw it into the | ||||
| @@ -868,12 +862,6 @@ transformTableConstraint(CreateStmtContext *cxt, Constraint *constraint) | ||||
| 						 errmsg("foreign key constraints are not supported on foreign tables"), | ||||
| 						 parser_errposition(cxt->pstate, | ||||
| 											constraint->location))); | ||||
| 			if (cxt->ispartitioned) | ||||
| 				ereport(ERROR, | ||||
| 						(errcode(ERRCODE_FEATURE_NOT_SUPPORTED), | ||||
| 						 errmsg("foreign key constraints are not supported on partitioned tables"), | ||||
| 						 parser_errposition(cxt->pstate, | ||||
| 											constraint->location))); | ||||
| 			cxt->fkconstraints = lappend(cxt->fkconstraints, constraint); | ||||
| 			break; | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user