*** a/src/test/regress/expected/update.out --- b/src/test/regress/expected/update.out *************** *** 87,90 **** ERROR: invalid reference to FROM-clause entry for table "update_test" --- 87,99 ---- LINE 1: UPDATE update_test AS t SET b = update_test.b + 10 WHERE t.a... ^ HINT: Perhaps you meant to reference the table alias "t". + -- Make sure that we can update to a TOASTed value. + UPDATE update_test SET c = repeat('x', 10000) WHERE c = 'car'; + SELECT a, b, char_length(c) FROM update_test; + a | b | char_length + -----+----+------------- + 100 | 20 | + 11 | 41 | 10000 + (2 rows) + DROP TABLE update_test; *** a/src/test/regress/sql/update.sql --- b/src/test/regress/sql/update.sql *************** *** 54,57 **** UPDATE update_test SET (a,b) = (select a,b FROM update_test where c = 'foo') --- 54,61 ---- -- to the original table name UPDATE update_test AS t SET b = update_test.b + 10 WHERE t.a = 10; + -- Make sure that we can update to a TOASTed value. + UPDATE update_test SET c = repeat('x', 10000) WHERE c = 'car'; + SELECT a, b, char_length(c) FROM update_test; + DROP TABLE update_test;