|
|
@ -397,6 +397,7 @@ create_toast_table(Relation rel, Oid toastOid, Oid toastIndexOid, |
|
|
|
* (1) there are any toastable attributes, and (2) the maximum length |
|
|
|
* (1) there are any toastable attributes, and (2) the maximum length |
|
|
|
* of a tuple could exceed TOAST_TUPLE_THRESHOLD. (We don't want to |
|
|
|
* of a tuple could exceed TOAST_TUPLE_THRESHOLD. (We don't want to |
|
|
|
* create a toast table for something like "f1 varchar(20)".) |
|
|
|
* create a toast table for something like "f1 varchar(20)".) |
|
|
|
|
|
|
|
* No need to create a TOAST table for partitioned tables. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
static bool |
|
|
|
static bool |
|
|
|
needs_toast_table(Relation rel) |
|
|
|
needs_toast_table(Relation rel) |
|
|
@ -408,6 +409,9 @@ needs_toast_table(Relation rel) |
|
|
|
int32 tuple_length; |
|
|
|
int32 tuple_length; |
|
|
|
int i; |
|
|
|
int i; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (rel->rd_rel->relkind == RELKIND_PARTITIONED_TABLE) |
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
|
|
|
|
tupdesc = rel->rd_att; |
|
|
|
tupdesc = rel->rd_att; |
|
|
|
|
|
|
|
|
|
|
|
for (i = 0; i < tupdesc->natts; i++) |
|
|
|
for (i = 0; i < tupdesc->natts; i++) |
|
|
|