diff --git a/contrib/citext/expected/citext.out b/contrib/citext/expected/citext.out
index 1a1e6c8..4a5ced5 100644
--- a/contrib/citext/expected/citext.out
+++ b/contrib/citext/expected/citext.out
@@ -1081,12 +1081,14 @@ ERROR:  column "bytea" is of type bytea but expression is of type text
 LINE 1: INSERT INTO caster (bytea)         VALUES ('foo'::text);
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "bytea", type bytea
 INSERT INTO caster (text)          VALUES ('foo'::bytea);
 INSERT INTO caster (bytea)         VALUES ('foo'::citext);
 ERROR:  column "bytea" is of type bytea but expression is of type citext
 LINE 1: INSERT INTO caster (bytea)         VALUES ('foo'::citext);
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "bytea", type bytea
 INSERT INTO caster (citext)        VALUES ('foo'::bytea);
 -- Cannot cast to boolean on assignment.
 INSERT INTO caster (boolean)       VALUES ('t'::text);
@@ -1094,12 +1096,14 @@ ERROR:  column "boolean" is of type boolean but expression is of type text
 LINE 1: INSERT INTO caster (boolean)       VALUES ('t'::text);
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "boolean", type boolean
 INSERT INTO caster (text)          VALUES ('t'::boolean);
 INSERT INTO caster (boolean)       VALUES ('t'::citext);
 ERROR:  column "boolean" is of type boolean but expression is of type citext
 LINE 1: INSERT INTO caster (boolean)       VALUES ('t'::citext);
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "boolean", type boolean
 INSERT INTO caster (citext)        VALUES ('t'::boolean);
 -- Cannot cast to float8 on assignment.
 INSERT INTO caster (float8)        VALUES ('12.42'::text);
@@ -1107,12 +1111,14 @@ ERROR:  column "float8" is of type double precision but expression is of type te
 LINE 1: INSERT INTO caster (float8)        VALUES ('12.42'::text);
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "float8", type double precision
 INSERT INTO caster (text)          VALUES ('12.42'::float8);
 INSERT INTO caster (float8)        VALUES ('12.42'::citext);
 ERROR:  column "float8" is of type double precision but expression is of type citext
 LINE 1: INSERT INTO caster (float8)        VALUES ('12.42'::citext);
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "float8", type double precision
 INSERT INTO caster (citext)        VALUES ('12.42'::float8);
 -- Cannot cast to float4 on assignment.
 INSERT INTO caster (float4)        VALUES ('12.42'::text);
@@ -1120,12 +1126,14 @@ ERROR:  column "float4" is of type real but expression is of type text
 LINE 1: INSERT INTO caster (float4)        VALUES ('12.42'::text);
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "float4", type real
 INSERT INTO caster (text)          VALUES ('12.42'::float4);
 INSERT INTO caster (float4)        VALUES ('12.42'::citext);
 ERROR:  column "float4" is of type real but expression is of type citext
 LINE 1: INSERT INTO caster (float4)        VALUES ('12.42'::citext);
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "float4", type real
 INSERT INTO caster (citext)        VALUES ('12.42'::float4);
 -- Cannot cast to numeric on assignment.
 INSERT INTO caster (numeric)       VALUES ('12.42'::text);
@@ -1133,12 +1141,14 @@ ERROR:  column "numeric" is of type numeric but expression is of type text
 LINE 1: INSERT INTO caster (numeric)       VALUES ('12.42'::text);
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "numeric", type numeric
 INSERT INTO caster (text)          VALUES ('12.42'::numeric);
 INSERT INTO caster (numeric)       VALUES ('12.42'::citext);
 ERROR:  column "numeric" is of type numeric but expression is of type citext
 LINE 1: INSERT INTO caster (numeric)       VALUES ('12.42'::citext);
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "numeric", type numeric
 INSERT INTO caster (citext)        VALUES ('12.42'::numeric);
 -- Cannot cast to int8 on assignment.
 INSERT INTO caster (int8)          VALUES ('12'::text);
@@ -1146,12 +1156,14 @@ ERROR:  column "int8" is of type bigint but expression is of type text
 LINE 1: INSERT INTO caster (int8)          VALUES ('12'::text);
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "int8", type bigint
 INSERT INTO caster (text)          VALUES ('12'::int8);
 INSERT INTO caster (int8)          VALUES ('12'::citext);
 ERROR:  column "int8" is of type bigint but expression is of type citext
 LINE 1: INSERT INTO caster (int8)          VALUES ('12'::citext);
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "int8", type bigint
 INSERT INTO caster (citext)        VALUES ('12'::int8);
 -- Cannot cast to int4 on assignment.
 INSERT INTO caster (int4)          VALUES ('12'::text);
@@ -1159,12 +1171,14 @@ ERROR:  column "int4" is of type integer but expression is of type text
 LINE 1: INSERT INTO caster (int4)          VALUES ('12'::text);
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "int4", type integer
 INSERT INTO caster (text)          VALUES ('12'::int4);
 INSERT INTO caster (int4)          VALUES ('12'::citext);
 ERROR:  column "int4" is of type integer but expression is of type citext
 LINE 1: INSERT INTO caster (int4)          VALUES ('12'::citext);
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "int4", type integer
 INSERT INTO caster (citext)        VALUES ('12'::int4);
 -- Cannot cast to int2 on assignment.
 INSERT INTO caster (int2)          VALUES ('12'::text);
@@ -1172,12 +1186,14 @@ ERROR:  column "int2" is of type smallint but expression is of type text
 LINE 1: INSERT INTO caster (int2)          VALUES ('12'::text);
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "int2", type smallint
 INSERT INTO caster (text)          VALUES ('12'::int2);
 INSERT INTO caster (int2)          VALUES ('12'::citext);
 ERROR:  column "int2" is of type smallint but expression is of type citext
 LINE 1: INSERT INTO caster (int2)          VALUES ('12'::citext);
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "int2", type smallint
 INSERT INTO caster (citext)        VALUES ('12'::int2);
 -- Cannot cast to cidr on assignment.
 INSERT INTO caster (cidr)          VALUES ('192.168.100.128/25'::text);
@@ -1185,12 +1201,14 @@ ERROR:  column "cidr" is of type cidr but expression is of type text
 LINE 1: INSERT INTO caster (cidr)          VALUES ('192.168.100.128/...
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "cidr", type cidr
 INSERT INTO caster (text)          VALUES ('192.168.100.128/25'::cidr);
 INSERT INTO caster (cidr)          VALUES ('192.168.100.128/25'::citext);
 ERROR:  column "cidr" is of type cidr but expression is of type citext
 LINE 1: INSERT INTO caster (cidr)          VALUES ('192.168.100.128/...
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "cidr", type cidr
 INSERT INTO caster (citext)        VALUES ('192.168.100.128/25'::cidr);
 -- Cannot cast to inet on assignment.
 INSERT INTO caster (inet)          VALUES ('192.168.100.128'::text);
@@ -1198,12 +1216,14 @@ ERROR:  column "inet" is of type inet but expression is of type text
 LINE 1: INSERT INTO caster (inet)          VALUES ('192.168.100.128'...
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "inet", type inet
 INSERT INTO caster (text)          VALUES ('192.168.100.128'::inet);
 INSERT INTO caster (inet)          VALUES ('192.168.100.128'::citext);
 ERROR:  column "inet" is of type inet but expression is of type citext
 LINE 1: INSERT INTO caster (inet)          VALUES ('192.168.100.128'...
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "inet", type inet
 INSERT INTO caster (citext)        VALUES ('192.168.100.128'::inet);
 -- Cannot cast to macaddr on assignment.
 INSERT INTO caster (macaddr)       VALUES ('08:00:2b:01:02:03'::text);
@@ -1211,12 +1231,14 @@ ERROR:  column "macaddr" is of type macaddr but expression is of type text
 LINE 1: INSERT INTO caster (macaddr)       VALUES ('08:00:2b:01:02:0...
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "macaddr", type macaddr
 INSERT INTO caster (text)          VALUES ('08:00:2b:01:02:03'::macaddr);
 INSERT INTO caster (macaddr)       VALUES ('08:00:2b:01:02:03'::citext);
 ERROR:  column "macaddr" is of type macaddr but expression is of type citext
 LINE 1: INSERT INTO caster (macaddr)       VALUES ('08:00:2b:01:02:0...
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "macaddr", type macaddr
 INSERT INTO caster (citext)        VALUES ('08:00:2b:01:02:03'::macaddr);
 -- Cannot cast to money on assignment.
 INSERT INTO caster (money)         VALUES ('12'::text);
@@ -1224,12 +1246,14 @@ ERROR:  column "money" is of type money but expression is of type text
 LINE 1: INSERT INTO caster (money)         VALUES ('12'::text);
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "money", type money
 INSERT INTO caster (text)          VALUES ('12'::money);
 INSERT INTO caster (money)         VALUES ('12'::citext);
 ERROR:  column "money" is of type money but expression is of type citext
 LINE 1: INSERT INTO caster (money)         VALUES ('12'::citext);
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "money", type money
 INSERT INTO caster (citext)        VALUES ('12'::money);
 -- Cannot cast to timestamp on assignment.
 INSERT INTO caster (timestamp)     VALUES ('1999-01-08 04:05:06'::text);
@@ -1237,12 +1261,14 @@ ERROR:  column "timestamp" is of type timestamp without time zone but expression
 LINE 1: INSERT INTO caster (timestamp)     VALUES ('1999-01-08 04:05...
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "timestamp", type timestamp without time zone
 INSERT INTO caster (text)          VALUES ('1999-01-08 04:05:06'::timestamp);
 INSERT INTO caster (timestamp)     VALUES ('1999-01-08 04:05:06'::citext);
 ERROR:  column "timestamp" is of type timestamp without time zone but expression is of type citext
 LINE 1: INSERT INTO caster (timestamp)     VALUES ('1999-01-08 04:05...
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "timestamp", type timestamp without time zone
 INSERT INTO caster (citext)        VALUES ('1999-01-08 04:05:06'::timestamp);
 -- Cannot cast to timestamptz on assignment.
 INSERT INTO caster (timestamptz)   VALUES ('1999-01-08 04:05:06'::text);
@@ -1250,12 +1276,14 @@ ERROR:  column "timestamptz" is of type timestamp with time zone but expression
 LINE 1: INSERT INTO caster (timestamptz)   VALUES ('1999-01-08 04:05...
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "timestamptz", type timestamp with time zone
 INSERT INTO caster (text)          VALUES ('1999-01-08 04:05:06'::timestamptz);
 INSERT INTO caster (timestamptz)   VALUES ('1999-01-08 04:05:06'::citext);
 ERROR:  column "timestamptz" is of type timestamp with time zone but expression is of type citext
 LINE 1: INSERT INTO caster (timestamptz)   VALUES ('1999-01-08 04:05...
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "timestamptz", type timestamp with time zone
 INSERT INTO caster (citext)        VALUES ('1999-01-08 04:05:06'::timestamptz);
 -- Cannot cast to interval on assignment.
 INSERT INTO caster (interval)      VALUES ('1 hour'::text);
@@ -1263,12 +1291,14 @@ ERROR:  column "interval" is of type interval but expression is of type text
 LINE 1: INSERT INTO caster (interval)      VALUES ('1 hour'::text);
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "interval", type interval
 INSERT INTO caster (text)          VALUES ('1 hour'::interval);
 INSERT INTO caster (interval)      VALUES ('1 hour'::citext);
 ERROR:  column "interval" is of type interval but expression is of type citext
 LINE 1: INSERT INTO caster (interval)      VALUES ('1 hour'::citext)...
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "interval", type interval
 INSERT INTO caster (citext)        VALUES ('1 hour'::interval);
 -- Cannot cast to date on assignment.
 INSERT INTO caster (date)          VALUES ('1999-01-08'::text);
@@ -1276,12 +1306,14 @@ ERROR:  column "date" is of type date but expression is of type text
 LINE 1: INSERT INTO caster (date)          VALUES ('1999-01-08'::tex...
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "date", type date
 INSERT INTO caster (text)          VALUES ('1999-01-08'::date);
 INSERT INTO caster (date)          VALUES ('1999-01-08'::citext);
 ERROR:  column "date" is of type date but expression is of type citext
 LINE 1: INSERT INTO caster (date)          VALUES ('1999-01-08'::cit...
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "date", type date
 INSERT INTO caster (citext)        VALUES ('1999-01-08'::date);
 -- Cannot cast to time on assignment.
 INSERT INTO caster (time)          VALUES ('04:05:06'::text);
@@ -1289,12 +1321,14 @@ ERROR:  column "time" is of type time without time zone but expression is of typ
 LINE 1: INSERT INTO caster (time)          VALUES ('04:05:06'::text)...
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "time", type time without time zone
 INSERT INTO caster (text)          VALUES ('04:05:06'::time);
 INSERT INTO caster (time)          VALUES ('04:05:06'::citext);
 ERROR:  column "time" is of type time without time zone but expression is of type citext
 LINE 1: INSERT INTO caster (time)          VALUES ('04:05:06'::citex...
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "time", type time without time zone
 INSERT INTO caster (citext)        VALUES ('04:05:06'::time);
 -- Cannot cast to timetz on assignment.
 INSERT INTO caster (timetz)        VALUES ('04:05:06'::text);
@@ -1302,12 +1336,14 @@ ERROR:  column "timetz" is of type time with time zone but expression is of type
 LINE 1: INSERT INTO caster (timetz)        VALUES ('04:05:06'::text)...
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "timetz", type time with time zone
 INSERT INTO caster (text)          VALUES ('04:05:06'::timetz);
 INSERT INTO caster (timetz)        VALUES ('04:05:06'::citext);
 ERROR:  column "timetz" is of type time with time zone but expression is of type citext
 LINE 1: INSERT INTO caster (timetz)        VALUES ('04:05:06'::citex...
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "timetz", type time with time zone
 INSERT INTO caster (citext)        VALUES ('04:05:06'::timetz);
 -- Cannot cast to point on assignment.
 INSERT INTO caster (point)         VALUES ('( 1 , 1)'::text);
@@ -1315,12 +1351,14 @@ ERROR:  column "point" is of type point but expression is of type text
 LINE 1: INSERT INTO caster (point)         VALUES ('( 1 , 1)'::text)...
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "point", type point
 INSERT INTO caster (text)          VALUES ('( 1 , 1)'::point);
 INSERT INTO caster (point)         VALUES ('( 1 , 1)'::citext);
 ERROR:  column "point" is of type point but expression is of type citext
 LINE 1: INSERT INTO caster (point)         VALUES ('( 1 , 1)'::citex...
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "point", type point
 INSERT INTO caster (citext)        VALUES ('( 1 , 1)'::point);
 -- Cannot cast to lseg on assignment.
 INSERT INTO caster (lseg)          VALUES ('( 1 , 1 ) , ( 2 , 2 )'::text);
@@ -1328,12 +1366,14 @@ ERROR:  column "lseg" is of type lseg but expression is of type text
 LINE 1: INSERT INTO caster (lseg)          VALUES ('( 1 , 1 ) , ( 2 ...
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "lseg", type lseg
 INSERT INTO caster (text)          VALUES ('( 1 , 1 ) , ( 2 , 2 )'::lseg);
 INSERT INTO caster (lseg)          VALUES ('( 1 , 1 ) , ( 2 , 2 )'::citext);
 ERROR:  column "lseg" is of type lseg but expression is of type citext
 LINE 1: INSERT INTO caster (lseg)          VALUES ('( 1 , 1 ) , ( 2 ...
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "lseg", type lseg
 INSERT INTO caster (citext)        VALUES ('( 1 , 1 ) , ( 2 , 2 )'::lseg);
 -- Cannot cast to box on assignment.
 INSERT INTO caster (box)           VALUES ('(0,0),(1,1)'::text);
@@ -1341,12 +1381,14 @@ ERROR:  column "box" is of type box but expression is of type text
 LINE 1: INSERT INTO caster (box)           VALUES ('(0,0),(1,1)'::te...
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "box", type box
 INSERT INTO caster (text)          VALUES ('(0,0),(1,1)'::box);
 INSERT INTO caster (box)           VALUES ('(0,0),(1,1)'::citext);
 ERROR:  column "box" is of type box but expression is of type citext
 LINE 1: INSERT INTO caster (box)           VALUES ('(0,0),(1,1)'::ci...
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "box", type box
 INSERT INTO caster (citext)        VALUES ('(0,0),(1,1)'::box);
 -- Cannot cast to path on assignment.
 INSERT INTO caster (path)          VALUES ('((0,0),(1,1),(2,0))'::text);
@@ -1354,12 +1396,14 @@ ERROR:  column "path" is of type path but expression is of type text
 LINE 1: INSERT INTO caster (path)          VALUES ('((0,0),(1,1),(2,...
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "path", type path
 INSERT INTO caster (text)          VALUES ('((0,0),(1,1),(2,0))'::path);
 INSERT INTO caster (path)          VALUES ('((0,0),(1,1),(2,0))'::citext);
 ERROR:  column "path" is of type path but expression is of type citext
 LINE 1: INSERT INTO caster (path)          VALUES ('((0,0),(1,1),(2,...
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "path", type path
 INSERT INTO caster (citext)        VALUES ('((0,0),(1,1),(2,0))'::path);
 -- Cannot cast to polygon on assignment.
 INSERT INTO caster (polygon)       VALUES ('((0,0),(1,1))'::text);
@@ -1367,12 +1411,14 @@ ERROR:  column "polygon" is of type polygon but expression is of type text
 LINE 1: INSERT INTO caster (polygon)       VALUES ('((0,0),(1,1))'::...
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "polygon", type polygon
 INSERT INTO caster (text)          VALUES ('((0,0),(1,1))'::polygon);
 INSERT INTO caster (polygon)       VALUES ('((0,0),(1,1))'::citext);
 ERROR:  column "polygon" is of type polygon but expression is of type citext
 LINE 1: INSERT INTO caster (polygon)       VALUES ('((0,0),(1,1))'::...
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "polygon", type polygon
 INSERT INTO caster (citext)        VALUES ('((0,0),(1,1))'::polygon);
 -- Cannot cast to circle on assignment.
 INSERT INTO caster (circle)        VALUES ('((0,0),2)'::text);
@@ -1380,12 +1426,14 @@ ERROR:  column "circle" is of type circle but expression is of type text
 LINE 1: INSERT INTO caster (circle)        VALUES ('((0,0),2)'::text...
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "circle", type circle
 INSERT INTO caster (text)          VALUES ('((0,0),2)'::circle);
 INSERT INTO caster (circle)        VALUES ('((0,0),2)'::citext);
 ERROR:  column "circle" is of type circle but expression is of type citext
 LINE 1: INSERT INTO caster (circle)        VALUES ('((0,0),2)'::cite...
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "circle", type circle
 INSERT INTO caster (citext)        VALUES ('((0,0),2)'::circle);
 -- Cannot cast to bit on assignment.
 INSERT INTO caster (bit)           VALUES ('101'::text);
@@ -1393,12 +1441,14 @@ ERROR:  column "bit" is of type bit but expression is of type text
 LINE 1: INSERT INTO caster (bit)           VALUES ('101'::text);
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "bit", type bit
 INSERT INTO caster (text)          VALUES ('101'::bit);
 INSERT INTO caster (bit)           VALUES ('101'::citext);
 ERROR:  column "bit" is of type bit but expression is of type citext
 LINE 1: INSERT INTO caster (bit)           VALUES ('101'::citext);
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "bit", type bit
 INSERT INTO caster (citext)        VALUES ('101'::bit);
 -- Cannot cast to bit varying on assignment.
 INSERT INTO caster (bitv)          VALUES ('101'::text);
@@ -1406,12 +1456,14 @@ ERROR:  column "bitv" is of type bit varying but expression is of type text
 LINE 1: INSERT INTO caster (bitv)          VALUES ('101'::text);
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "bitv", type bit varying
 INSERT INTO caster (text)          VALUES ('101'::bit varying);
 INSERT INTO caster (bitv)          VALUES ('101'::citext);
 ERROR:  column "bitv" is of type bit varying but expression is of type citext
 LINE 1: INSERT INTO caster (bitv)          VALUES ('101'::citext);
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "bitv", type bit varying
 INSERT INTO caster (citext)        VALUES ('101'::bit varying);
 -- Cannot cast to tsvector on assignment.
 INSERT INTO caster (tsvector)      VALUES ('the fat cat'::text);
@@ -1419,12 +1471,14 @@ ERROR:  column "tsvector" is of type tsvector but expression is of type text
 LINE 1: INSERT INTO caster (tsvector)      VALUES ('the fat cat'::te...
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "tsvector", type tsvector
 INSERT INTO caster (text)          VALUES ('the fat cat'::tsvector);
 INSERT INTO caster (tsvector)      VALUES ('the fat cat'::citext);
 ERROR:  column "tsvector" is of type tsvector but expression is of type citext
 LINE 1: INSERT INTO caster (tsvector)      VALUES ('the fat cat'::ci...
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "tsvector", type tsvector
 INSERT INTO caster (citext)        VALUES ('the fat cat'::tsvector);
 -- Cannot cast to tsquery on assignment.
 INSERT INTO caster (tsquery)       VALUES ('fat & rat'::text);
@@ -1432,12 +1486,14 @@ ERROR:  column "tsquery" is of type tsquery but expression is of type text
 LINE 1: INSERT INTO caster (tsquery)       VALUES ('fat & rat'::text...
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "tsquery", type tsquery
 INSERT INTO caster (text)          VALUES ('fat & rat'::tsquery);
 INSERT INTO caster (tsquery)       VALUES ('fat & rat'::citext);
 ERROR:  column "tsquery" is of type tsquery but expression is of type citext
 LINE 1: INSERT INTO caster (tsquery)       VALUES ('fat & rat'::cite...
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "tsquery", type tsquery
 INSERT INTO caster (citext)        VALUES ('fat & rat'::tsquery);
 -- Cannot cast to uuid on assignment.
 INSERT INTO caster (uuid)          VALUES ('a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11'::text);
@@ -1445,12 +1501,14 @@ ERROR:  column "uuid" is of type uuid but expression is of type text
 LINE 1: INSERT INTO caster (uuid)          VALUES ('a0eebc99-9c0b-4e...
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "uuid", type uuid
 INSERT INTO caster (text)          VALUES ('a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11'::uuid);
 INSERT INTO caster (uuid)          VALUES ('a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11'::citext);
 ERROR:  column "uuid" is of type uuid but expression is of type citext
 LINE 1: INSERT INTO caster (uuid)          VALUES ('a0eebc99-9c0b-4e...
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "uuid", type uuid
 INSERT INTO caster (citext)        VALUES ('a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11'::uuid);
 -- Table 9-5. SQL String Functions and Operators
 SELECT 'D'::citext || 'avid'::citext = 'David'::citext AS citext_concat;
diff --git a/contrib/citext/expected/citext_1.out b/contrib/citext/expected/citext_1.out
index 3331dbc..d8ecb06 100644
--- a/contrib/citext/expected/citext_1.out
+++ b/contrib/citext/expected/citext_1.out
@@ -1081,12 +1081,14 @@ ERROR:  column "bytea" is of type bytea but expression is of type text
 LINE 1: INSERT INTO caster (bytea)         VALUES ('foo'::text);
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "bytea", type bytea
 INSERT INTO caster (text)          VALUES ('foo'::bytea);
 INSERT INTO caster (bytea)         VALUES ('foo'::citext);
 ERROR:  column "bytea" is of type bytea but expression is of type citext
 LINE 1: INSERT INTO caster (bytea)         VALUES ('foo'::citext);
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "bytea", type bytea
 INSERT INTO caster (citext)        VALUES ('foo'::bytea);
 -- Cannot cast to boolean on assignment.
 INSERT INTO caster (boolean)       VALUES ('t'::text);
@@ -1094,12 +1096,14 @@ ERROR:  column "boolean" is of type boolean but expression is of type text
 LINE 1: INSERT INTO caster (boolean)       VALUES ('t'::text);
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "boolean", type boolean
 INSERT INTO caster (text)          VALUES ('t'::boolean);
 INSERT INTO caster (boolean)       VALUES ('t'::citext);
 ERROR:  column "boolean" is of type boolean but expression is of type citext
 LINE 1: INSERT INTO caster (boolean)       VALUES ('t'::citext);
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "boolean", type boolean
 INSERT INTO caster (citext)        VALUES ('t'::boolean);
 -- Cannot cast to float8 on assignment.
 INSERT INTO caster (float8)        VALUES ('12.42'::text);
@@ -1107,12 +1111,14 @@ ERROR:  column "float8" is of type double precision but expression is of type te
 LINE 1: INSERT INTO caster (float8)        VALUES ('12.42'::text);
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "float8", type double precision
 INSERT INTO caster (text)          VALUES ('12.42'::float8);
 INSERT INTO caster (float8)        VALUES ('12.42'::citext);
 ERROR:  column "float8" is of type double precision but expression is of type citext
 LINE 1: INSERT INTO caster (float8)        VALUES ('12.42'::citext);
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "float8", type double precision
 INSERT INTO caster (citext)        VALUES ('12.42'::float8);
 -- Cannot cast to float4 on assignment.
 INSERT INTO caster (float4)        VALUES ('12.42'::text);
@@ -1120,12 +1126,14 @@ ERROR:  column "float4" is of type real but expression is of type text
 LINE 1: INSERT INTO caster (float4)        VALUES ('12.42'::text);
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "float4", type real
 INSERT INTO caster (text)          VALUES ('12.42'::float4);
 INSERT INTO caster (float4)        VALUES ('12.42'::citext);
 ERROR:  column "float4" is of type real but expression is of type citext
 LINE 1: INSERT INTO caster (float4)        VALUES ('12.42'::citext);
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "float4", type real
 INSERT INTO caster (citext)        VALUES ('12.42'::float4);
 -- Cannot cast to numeric on assignment.
 INSERT INTO caster (numeric)       VALUES ('12.42'::text);
@@ -1133,12 +1141,14 @@ ERROR:  column "numeric" is of type numeric but expression is of type text
 LINE 1: INSERT INTO caster (numeric)       VALUES ('12.42'::text);
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "numeric", type numeric
 INSERT INTO caster (text)          VALUES ('12.42'::numeric);
 INSERT INTO caster (numeric)       VALUES ('12.42'::citext);
 ERROR:  column "numeric" is of type numeric but expression is of type citext
 LINE 1: INSERT INTO caster (numeric)       VALUES ('12.42'::citext);
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "numeric", type numeric
 INSERT INTO caster (citext)        VALUES ('12.42'::numeric);
 -- Cannot cast to int8 on assignment.
 INSERT INTO caster (int8)          VALUES ('12'::text);
@@ -1146,12 +1156,14 @@ ERROR:  column "int8" is of type bigint but expression is of type text
 LINE 1: INSERT INTO caster (int8)          VALUES ('12'::text);
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "int8", type bigint
 INSERT INTO caster (text)          VALUES ('12'::int8);
 INSERT INTO caster (int8)          VALUES ('12'::citext);
 ERROR:  column "int8" is of type bigint but expression is of type citext
 LINE 1: INSERT INTO caster (int8)          VALUES ('12'::citext);
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "int8", type bigint
 INSERT INTO caster (citext)        VALUES ('12'::int8);
 -- Cannot cast to int4 on assignment.
 INSERT INTO caster (int4)          VALUES ('12'::text);
@@ -1159,12 +1171,14 @@ ERROR:  column "int4" is of type integer but expression is of type text
 LINE 1: INSERT INTO caster (int4)          VALUES ('12'::text);
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "int4", type integer
 INSERT INTO caster (text)          VALUES ('12'::int4);
 INSERT INTO caster (int4)          VALUES ('12'::citext);
 ERROR:  column "int4" is of type integer but expression is of type citext
 LINE 1: INSERT INTO caster (int4)          VALUES ('12'::citext);
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "int4", type integer
 INSERT INTO caster (citext)        VALUES ('12'::int4);
 -- Cannot cast to int2 on assignment.
 INSERT INTO caster (int2)          VALUES ('12'::text);
@@ -1172,12 +1186,14 @@ ERROR:  column "int2" is of type smallint but expression is of type text
 LINE 1: INSERT INTO caster (int2)          VALUES ('12'::text);
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "int2", type smallint
 INSERT INTO caster (text)          VALUES ('12'::int2);
 INSERT INTO caster (int2)          VALUES ('12'::citext);
 ERROR:  column "int2" is of type smallint but expression is of type citext
 LINE 1: INSERT INTO caster (int2)          VALUES ('12'::citext);
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "int2", type smallint
 INSERT INTO caster (citext)        VALUES ('12'::int2);
 -- Cannot cast to cidr on assignment.
 INSERT INTO caster (cidr)          VALUES ('192.168.100.128/25'::text);
@@ -1185,12 +1201,14 @@ ERROR:  column "cidr" is of type cidr but expression is of type text
 LINE 1: INSERT INTO caster (cidr)          VALUES ('192.168.100.128/...
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "cidr", type cidr
 INSERT INTO caster (text)          VALUES ('192.168.100.128/25'::cidr);
 INSERT INTO caster (cidr)          VALUES ('192.168.100.128/25'::citext);
 ERROR:  column "cidr" is of type cidr but expression is of type citext
 LINE 1: INSERT INTO caster (cidr)          VALUES ('192.168.100.128/...
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "cidr", type cidr
 INSERT INTO caster (citext)        VALUES ('192.168.100.128/25'::cidr);
 -- Cannot cast to inet on assignment.
 INSERT INTO caster (inet)          VALUES ('192.168.100.128'::text);
@@ -1198,12 +1216,14 @@ ERROR:  column "inet" is of type inet but expression is of type text
 LINE 1: INSERT INTO caster (inet)          VALUES ('192.168.100.128'...
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "inet", type inet
 INSERT INTO caster (text)          VALUES ('192.168.100.128'::inet);
 INSERT INTO caster (inet)          VALUES ('192.168.100.128'::citext);
 ERROR:  column "inet" is of type inet but expression is of type citext
 LINE 1: INSERT INTO caster (inet)          VALUES ('192.168.100.128'...
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "inet", type inet
 INSERT INTO caster (citext)        VALUES ('192.168.100.128'::inet);
 -- Cannot cast to macaddr on assignment.
 INSERT INTO caster (macaddr)       VALUES ('08:00:2b:01:02:03'::text);
@@ -1211,12 +1231,14 @@ ERROR:  column "macaddr" is of type macaddr but expression is of type text
 LINE 1: INSERT INTO caster (macaddr)       VALUES ('08:00:2b:01:02:0...
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "macaddr", type macaddr
 INSERT INTO caster (text)          VALUES ('08:00:2b:01:02:03'::macaddr);
 INSERT INTO caster (macaddr)       VALUES ('08:00:2b:01:02:03'::citext);
 ERROR:  column "macaddr" is of type macaddr but expression is of type citext
 LINE 1: INSERT INTO caster (macaddr)       VALUES ('08:00:2b:01:02:0...
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "macaddr", type macaddr
 INSERT INTO caster (citext)        VALUES ('08:00:2b:01:02:03'::macaddr);
 -- Cannot cast to money on assignment.
 INSERT INTO caster (money)         VALUES ('12'::text);
@@ -1224,12 +1246,14 @@ ERROR:  column "money" is of type money but expression is of type text
 LINE 1: INSERT INTO caster (money)         VALUES ('12'::text);
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "money", type money
 INSERT INTO caster (text)          VALUES ('12'::money);
 INSERT INTO caster (money)         VALUES ('12'::citext);
 ERROR:  column "money" is of type money but expression is of type citext
 LINE 1: INSERT INTO caster (money)         VALUES ('12'::citext);
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "money", type money
 INSERT INTO caster (citext)        VALUES ('12'::money);
 -- Cannot cast to timestamp on assignment.
 INSERT INTO caster (timestamp)     VALUES ('1999-01-08 04:05:06'::text);
@@ -1237,12 +1261,14 @@ ERROR:  column "timestamp" is of type timestamp without time zone but expression
 LINE 1: INSERT INTO caster (timestamp)     VALUES ('1999-01-08 04:05...
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "timestamp", type timestamp without time zone
 INSERT INTO caster (text)          VALUES ('1999-01-08 04:05:06'::timestamp);
 INSERT INTO caster (timestamp)     VALUES ('1999-01-08 04:05:06'::citext);
 ERROR:  column "timestamp" is of type timestamp without time zone but expression is of type citext
 LINE 1: INSERT INTO caster (timestamp)     VALUES ('1999-01-08 04:05...
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "timestamp", type timestamp without time zone
 INSERT INTO caster (citext)        VALUES ('1999-01-08 04:05:06'::timestamp);
 -- Cannot cast to timestamptz on assignment.
 INSERT INTO caster (timestamptz)   VALUES ('1999-01-08 04:05:06'::text);
@@ -1250,12 +1276,14 @@ ERROR:  column "timestamptz" is of type timestamp with time zone but expression
 LINE 1: INSERT INTO caster (timestamptz)   VALUES ('1999-01-08 04:05...
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "timestamptz", type timestamp with time zone
 INSERT INTO caster (text)          VALUES ('1999-01-08 04:05:06'::timestamptz);
 INSERT INTO caster (timestamptz)   VALUES ('1999-01-08 04:05:06'::citext);
 ERROR:  column "timestamptz" is of type timestamp with time zone but expression is of type citext
 LINE 1: INSERT INTO caster (timestamptz)   VALUES ('1999-01-08 04:05...
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "timestamptz", type timestamp with time zone
 INSERT INTO caster (citext)        VALUES ('1999-01-08 04:05:06'::timestamptz);
 -- Cannot cast to interval on assignment.
 INSERT INTO caster (interval)      VALUES ('1 hour'::text);
@@ -1263,12 +1291,14 @@ ERROR:  column "interval" is of type interval but expression is of type text
 LINE 1: INSERT INTO caster (interval)      VALUES ('1 hour'::text);
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "interval", type interval
 INSERT INTO caster (text)          VALUES ('1 hour'::interval);
 INSERT INTO caster (interval)      VALUES ('1 hour'::citext);
 ERROR:  column "interval" is of type interval but expression is of type citext
 LINE 1: INSERT INTO caster (interval)      VALUES ('1 hour'::citext)...
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "interval", type interval
 INSERT INTO caster (citext)        VALUES ('1 hour'::interval);
 -- Cannot cast to date on assignment.
 INSERT INTO caster (date)          VALUES ('1999-01-08'::text);
@@ -1276,12 +1306,14 @@ ERROR:  column "date" is of type date but expression is of type text
 LINE 1: INSERT INTO caster (date)          VALUES ('1999-01-08'::tex...
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "date", type date
 INSERT INTO caster (text)          VALUES ('1999-01-08'::date);
 INSERT INTO caster (date)          VALUES ('1999-01-08'::citext);
 ERROR:  column "date" is of type date but expression is of type citext
 LINE 1: INSERT INTO caster (date)          VALUES ('1999-01-08'::cit...
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "date", type date
 INSERT INTO caster (citext)        VALUES ('1999-01-08'::date);
 -- Cannot cast to time on assignment.
 INSERT INTO caster (time)          VALUES ('04:05:06'::text);
@@ -1289,12 +1321,14 @@ ERROR:  column "time" is of type time without time zone but expression is of typ
 LINE 1: INSERT INTO caster (time)          VALUES ('04:05:06'::text)...
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "time", type time without time zone
 INSERT INTO caster (text)          VALUES ('04:05:06'::time);
 INSERT INTO caster (time)          VALUES ('04:05:06'::citext);
 ERROR:  column "time" is of type time without time zone but expression is of type citext
 LINE 1: INSERT INTO caster (time)          VALUES ('04:05:06'::citex...
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "time", type time without time zone
 INSERT INTO caster (citext)        VALUES ('04:05:06'::time);
 -- Cannot cast to timetz on assignment.
 INSERT INTO caster (timetz)        VALUES ('04:05:06'::text);
@@ -1302,12 +1336,14 @@ ERROR:  column "timetz" is of type time with time zone but expression is of type
 LINE 1: INSERT INTO caster (timetz)        VALUES ('04:05:06'::text)...
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "timetz", type time with time zone
 INSERT INTO caster (text)          VALUES ('04:05:06'::timetz);
 INSERT INTO caster (timetz)        VALUES ('04:05:06'::citext);
 ERROR:  column "timetz" is of type time with time zone but expression is of type citext
 LINE 1: INSERT INTO caster (timetz)        VALUES ('04:05:06'::citex...
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "timetz", type time with time zone
 INSERT INTO caster (citext)        VALUES ('04:05:06'::timetz);
 -- Cannot cast to point on assignment.
 INSERT INTO caster (point)         VALUES ('( 1 , 1)'::text);
@@ -1315,12 +1351,14 @@ ERROR:  column "point" is of type point but expression is of type text
 LINE 1: INSERT INTO caster (point)         VALUES ('( 1 , 1)'::text)...
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "point", type point
 INSERT INTO caster (text)          VALUES ('( 1 , 1)'::point);
 INSERT INTO caster (point)         VALUES ('( 1 , 1)'::citext);
 ERROR:  column "point" is of type point but expression is of type citext
 LINE 1: INSERT INTO caster (point)         VALUES ('( 1 , 1)'::citex...
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "point", type point
 INSERT INTO caster (citext)        VALUES ('( 1 , 1)'::point);
 -- Cannot cast to lseg on assignment.
 INSERT INTO caster (lseg)          VALUES ('( 1 , 1 ) , ( 2 , 2 )'::text);
@@ -1328,12 +1366,14 @@ ERROR:  column "lseg" is of type lseg but expression is of type text
 LINE 1: INSERT INTO caster (lseg)          VALUES ('( 1 , 1 ) , ( 2 ...
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "lseg", type lseg
 INSERT INTO caster (text)          VALUES ('( 1 , 1 ) , ( 2 , 2 )'::lseg);
 INSERT INTO caster (lseg)          VALUES ('( 1 , 1 ) , ( 2 , 2 )'::citext);
 ERROR:  column "lseg" is of type lseg but expression is of type citext
 LINE 1: INSERT INTO caster (lseg)          VALUES ('( 1 , 1 ) , ( 2 ...
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "lseg", type lseg
 INSERT INTO caster (citext)        VALUES ('( 1 , 1 ) , ( 2 , 2 )'::lseg);
 -- Cannot cast to box on assignment.
 INSERT INTO caster (box)           VALUES ('(0,0),(1,1)'::text);
@@ -1341,12 +1381,14 @@ ERROR:  column "box" is of type box but expression is of type text
 LINE 1: INSERT INTO caster (box)           VALUES ('(0,0),(1,1)'::te...
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "box", type box
 INSERT INTO caster (text)          VALUES ('(0,0),(1,1)'::box);
 INSERT INTO caster (box)           VALUES ('(0,0),(1,1)'::citext);
 ERROR:  column "box" is of type box but expression is of type citext
 LINE 1: INSERT INTO caster (box)           VALUES ('(0,0),(1,1)'::ci...
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "box", type box
 INSERT INTO caster (citext)        VALUES ('(0,0),(1,1)'::box);
 -- Cannot cast to path on assignment.
 INSERT INTO caster (path)          VALUES ('((0,0),(1,1),(2,0))'::text);
@@ -1354,12 +1396,14 @@ ERROR:  column "path" is of type path but expression is of type text
 LINE 1: INSERT INTO caster (path)          VALUES ('((0,0),(1,1),(2,...
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "path", type path
 INSERT INTO caster (text)          VALUES ('((0,0),(1,1),(2,0))'::path);
 INSERT INTO caster (path)          VALUES ('((0,0),(1,1),(2,0))'::citext);
 ERROR:  column "path" is of type path but expression is of type citext
 LINE 1: INSERT INTO caster (path)          VALUES ('((0,0),(1,1),(2,...
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "path", type path
 INSERT INTO caster (citext)        VALUES ('((0,0),(1,1),(2,0))'::path);
 -- Cannot cast to polygon on assignment.
 INSERT INTO caster (polygon)       VALUES ('((0,0),(1,1))'::text);
@@ -1367,12 +1411,14 @@ ERROR:  column "polygon" is of type polygon but expression is of type text
 LINE 1: INSERT INTO caster (polygon)       VALUES ('((0,0),(1,1))'::...
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "polygon", type polygon
 INSERT INTO caster (text)          VALUES ('((0,0),(1,1))'::polygon);
 INSERT INTO caster (polygon)       VALUES ('((0,0),(1,1))'::citext);
 ERROR:  column "polygon" is of type polygon but expression is of type citext
 LINE 1: INSERT INTO caster (polygon)       VALUES ('((0,0),(1,1))'::...
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "polygon", type polygon
 INSERT INTO caster (citext)        VALUES ('((0,0),(1,1))'::polygon);
 -- Cannot cast to circle on assignment.
 INSERT INTO caster (circle)        VALUES ('((0,0),2)'::text);
@@ -1380,12 +1426,14 @@ ERROR:  column "circle" is of type circle but expression is of type text
 LINE 1: INSERT INTO caster (circle)        VALUES ('((0,0),2)'::text...
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "circle", type circle
 INSERT INTO caster (text)          VALUES ('((0,0),2)'::circle);
 INSERT INTO caster (circle)        VALUES ('((0,0),2)'::citext);
 ERROR:  column "circle" is of type circle but expression is of type citext
 LINE 1: INSERT INTO caster (circle)        VALUES ('((0,0),2)'::cite...
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "circle", type circle
 INSERT INTO caster (citext)        VALUES ('((0,0),2)'::circle);
 -- Cannot cast to bit on assignment.
 INSERT INTO caster (bit)           VALUES ('101'::text);
@@ -1393,12 +1441,14 @@ ERROR:  column "bit" is of type bit but expression is of type text
 LINE 1: INSERT INTO caster (bit)           VALUES ('101'::text);
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "bit", type bit
 INSERT INTO caster (text)          VALUES ('101'::bit);
 INSERT INTO caster (bit)           VALUES ('101'::citext);
 ERROR:  column "bit" is of type bit but expression is of type citext
 LINE 1: INSERT INTO caster (bit)           VALUES ('101'::citext);
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "bit", type bit
 INSERT INTO caster (citext)        VALUES ('101'::bit);
 -- Cannot cast to bit varying on assignment.
 INSERT INTO caster (bitv)          VALUES ('101'::text);
@@ -1406,12 +1456,14 @@ ERROR:  column "bitv" is of type bit varying but expression is of type text
 LINE 1: INSERT INTO caster (bitv)          VALUES ('101'::text);
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "bitv", type bit varying
 INSERT INTO caster (text)          VALUES ('101'::bit varying);
 INSERT INTO caster (bitv)          VALUES ('101'::citext);
 ERROR:  column "bitv" is of type bit varying but expression is of type citext
 LINE 1: INSERT INTO caster (bitv)          VALUES ('101'::citext);
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "bitv", type bit varying
 INSERT INTO caster (citext)        VALUES ('101'::bit varying);
 -- Cannot cast to tsvector on assignment.
 INSERT INTO caster (tsvector)      VALUES ('the fat cat'::text);
@@ -1419,12 +1471,14 @@ ERROR:  column "tsvector" is of type tsvector but expression is of type text
 LINE 1: INSERT INTO caster (tsvector)      VALUES ('the fat cat'::te...
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "tsvector", type tsvector
 INSERT INTO caster (text)          VALUES ('the fat cat'::tsvector);
 INSERT INTO caster (tsvector)      VALUES ('the fat cat'::citext);
 ERROR:  column "tsvector" is of type tsvector but expression is of type citext
 LINE 1: INSERT INTO caster (tsvector)      VALUES ('the fat cat'::ci...
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "tsvector", type tsvector
 INSERT INTO caster (citext)        VALUES ('the fat cat'::tsvector);
 -- Cannot cast to tsquery on assignment.
 INSERT INTO caster (tsquery)       VALUES ('fat & rat'::text);
@@ -1432,12 +1486,14 @@ ERROR:  column "tsquery" is of type tsquery but expression is of type text
 LINE 1: INSERT INTO caster (tsquery)       VALUES ('fat & rat'::text...
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "tsquery", type tsquery
 INSERT INTO caster (text)          VALUES ('fat & rat'::tsquery);
 INSERT INTO caster (tsquery)       VALUES ('fat & rat'::citext);
 ERROR:  column "tsquery" is of type tsquery but expression is of type citext
 LINE 1: INSERT INTO caster (tsquery)       VALUES ('fat & rat'::cite...
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "tsquery", type tsquery
 INSERT INTO caster (citext)        VALUES ('fat & rat'::tsquery);
 -- Cannot cast to uuid on assignment.
 INSERT INTO caster (uuid)          VALUES ('a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11'::text);
@@ -1445,12 +1501,14 @@ ERROR:  column "uuid" is of type uuid but expression is of type text
 LINE 1: INSERT INTO caster (uuid)          VALUES ('a0eebc99-9c0b-4e...
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "uuid", type uuid
 INSERT INTO caster (text)          VALUES ('a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11'::uuid);
 INSERT INTO caster (uuid)          VALUES ('a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11'::citext);
 ERROR:  column "uuid" is of type uuid but expression is of type citext
 LINE 1: INSERT INTO caster (uuid)          VALUES ('a0eebc99-9c0b-4e...
                                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "caster", column "uuid", type uuid
 INSERT INTO caster (citext)        VALUES ('a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11'::uuid);
 -- Table 9-5. SQL String Functions and Operators
 SELECT 'D'::citext || 'avid'::citext = 'David'::citext AS citext_concat;
diff --git a/src/backend/parser/parse_target.c b/src/backend/parser/parse_target.c
index b7b82bf..39ed7e0 100644
--- a/src/backend/parser/parse_target.c
+++ b/src/backend/parser/parse_target.c
@@ -33,6 +33,16 @@
 #include "utils/typcache.h"
 
 
+/* Error callback context for transformAssignedExpr */
+typedef struct TransformExprState
+{
+	const char *column_name;
+	const char *relation_name;
+	Oid			expected_type;
+	bool		is_insert;
+} TransformExprState;
+
+
 static void markTargetListOrigin(ParseState *pstate, TargetEntry *tle,
 					 Var *var, int levelsup);
 static Node *transformAssignmentIndirection(ParseState *pstate,
@@ -366,6 +376,34 @@ markTargetListOrigin(ParseState *pstate, TargetEntry *tle,
 
 
 /*
+ *
+ * Error context callback for transformAssignedExpr.
+ *
+ * The argument for the error context must be TransformExprState.
+ */
+static void
+TransformExprCallback(void *arg)
+{
+	TransformExprState *state = (TransformExprState *) arg;
+
+	if (state->is_insert)
+	{
+		errcontext("INSERT \"%s\", column \"%s\", type %s",
+				   state->relation_name,
+				   state->column_name,
+				   format_type_be(state->expected_type));
+	}
+	else
+	{
+		errcontext("UPDATE \"%s\", column \"%s\", type %s",
+				   state->relation_name,
+				   state->column_name,
+				   format_type_be(state->expected_type));
+	}
+}
+
+
+/*
  * transformAssignedExpr()
  *	This is used in INSERT and UPDATE statements only.  It prepares an
  *	expression for assignment to a column of the target table.
@@ -404,6 +442,8 @@ transformAssignedExpr(ParseState *pstate,
 	int32		attrtypmod;
 	Oid			attrcollation;	/* collation of target column */
 	ParseExprKind sv_expr_kind;
+	ErrorContextCallback errcallback;
+	TransformExprState te_state;
 
 	/*
 	 * Save and restore identity of expression type we're parsing.  We must
@@ -425,6 +465,16 @@ transformAssignedExpr(ParseState *pstate,
 	attrtypmod = rd->rd_att->attrs[attrno - 1]->atttypmod;
 	attrcollation = rd->rd_att->attrs[attrno - 1]->attcollation;
 
+	/* Set up callback to fetch more details regarding the error */
+	errcallback.callback = TransformExprCallback;
+	errcallback.arg = (void *) &te_state;
+	errcallback.previous = error_context_stack;
+	error_context_stack = &errcallback;
+	te_state.relation_name = RelationGetRelationName(rd);
+	te_state.column_name = colname;
+	te_state.expected_type = attrtype;
+	te_state.is_insert = pstate->p_is_insert;
+
 	/*
 	 * If the expression is a DEFAULT placeholder, insert the attribute's
 	 * type/typmod/collation into it so that exprType etc will report the
@@ -531,6 +581,9 @@ transformAssignedExpr(ParseState *pstate,
 
 	pstate->p_expr_kind = sv_expr_kind;
 
+	/* Reset error callback */
+	error_context_stack = errcallback.previous;
+
 	return expr;
 }
 
diff --git a/src/test/regress/expected/abstime.out b/src/test/regress/expected/abstime.out
index ed48f64..bde5f25 100644
--- a/src/test/regress/expected/abstime.out
+++ b/src/test/regress/expected/abstime.out
@@ -32,15 +32,18 @@ ERROR:  date/time field value out of range: "Feb 35, 1946 10:00:00"
 LINE 1: INSERT INTO ABSTIME_TBL (f1) VALUES ('Feb 35, 1946 10:00:00'...
                                              ^
 HINT:  Perhaps you need a different "datestyle" setting.
+CONTEXT:  INSERT "abstime_tbl", column "f1", type abstime
 INSERT INTO ABSTIME_TBL (f1) VALUES ('Feb 28, 1984 25:08:10');
 ERROR:  date/time field value out of range: "Feb 28, 1984 25:08:10"
 LINE 1: INSERT INTO ABSTIME_TBL (f1) VALUES ('Feb 28, 1984 25:08:10'...
                                              ^
+CONTEXT:  INSERT "abstime_tbl", column "f1", type abstime
 -- badly formatted abstimes:  these should result in invalid abstimes
 INSERT INTO ABSTIME_TBL (f1) VALUES ('bad date format');
 ERROR:  invalid input syntax for type abstime: "bad date format"
 LINE 1: INSERT INTO ABSTIME_TBL (f1) VALUES ('bad date format');
                                              ^
+CONTEXT:  INSERT "abstime_tbl", column "f1", type abstime
 INSERT INTO ABSTIME_TBL (f1) VALUES ('Jun 10, 1843');
 -- test abstime operators
 SELECT '' AS eight, * FROM ABSTIME_TBL;
diff --git a/src/test/regress/expected/box.out b/src/test/regress/expected/box.out
index 5f8b945..4a01df9 100644
--- a/src/test/regress/expected/box.out
+++ b/src/test/regress/expected/box.out
@@ -27,10 +27,12 @@ INSERT INTO BOX_TBL (f1) VALUES ('(2.3, 4.5)');
 ERROR:  invalid input syntax for type box: "(2.3, 4.5)"
 LINE 1: INSERT INTO BOX_TBL (f1) VALUES ('(2.3, 4.5)');
                                          ^
+CONTEXT:  INSERT "box_tbl", column "f1", type box
 INSERT INTO BOX_TBL (f1) VALUES ('asdfasdf(ad');
 ERROR:  invalid input syntax for type box: "asdfasdf(ad"
 LINE 1: INSERT INTO BOX_TBL (f1) VALUES ('asdfasdf(ad');
                                          ^
+CONTEXT:  INSERT "box_tbl", column "f1", type box
 SELECT '' AS four, * FROM BOX_TBL;
  four |         f1          
 ------+---------------------
diff --git a/src/test/regress/expected/circle.out b/src/test/regress/expected/circle.out
index 9ba4a04..98576f0 100644
--- a/src/test/regress/expected/circle.out
+++ b/src/test/regress/expected/circle.out
@@ -13,14 +13,17 @@ INSERT INTO CIRCLE_TBL VALUES ('<(-100,0),-100>');
 ERROR:  invalid input syntax for type circle: "<(-100,0),-100>"
 LINE 1: INSERT INTO CIRCLE_TBL VALUES ('<(-100,0),-100>');
                                        ^
+CONTEXT:  INSERT "circle_tbl", column "f1", type circle
 INSERT INTO CIRCLE_TBL VALUES ('1abc,3,5');
 ERROR:  invalid input syntax for type circle: "1abc,3,5"
 LINE 1: INSERT INTO CIRCLE_TBL VALUES ('1abc,3,5');
                                        ^
+CONTEXT:  INSERT "circle_tbl", column "f1", type circle
 INSERT INTO CIRCLE_TBL VALUES ('(3,(1,2),3)');
 ERROR:  invalid input syntax for type circle: "(3,(1,2),3)"
 LINE 1: INSERT INTO CIRCLE_TBL VALUES ('(3,(1,2),3)');
                                        ^
+CONTEXT:  INSERT "circle_tbl", column "f1", type circle
 SELECT * FROM CIRCLE_TBL;
        f1       
 ----------------
diff --git a/src/test/regress/expected/date.out b/src/test/regress/expected/date.out
index 418b146..03e13f9 100644
--- a/src/test/regress/expected/date.out
+++ b/src/test/regress/expected/date.out
@@ -13,6 +13,7 @@ INSERT INTO DATE_TBL VALUES ('1997-02-29');
 ERROR:  date/time field value out of range: "1997-02-29"
 LINE 1: INSERT INTO DATE_TBL VALUES ('1997-02-29');
                                      ^
+CONTEXT:  INSERT "date_tbl", column "f1", type date
 INSERT INTO DATE_TBL VALUES ('1997-03-01');
 INSERT INTO DATE_TBL VALUES ('1997-03-02');
 INSERT INTO DATE_TBL VALUES ('2000-04-01');
diff --git a/src/test/regress/expected/float4-exp-three-digits.out b/src/test/regress/expected/float4-exp-three-digits.out
index f17f956..ebbbf08 100644
--- a/src/test/regress/expected/float4-exp-three-digits.out
+++ b/src/test/regress/expected/float4-exp-three-digits.out
@@ -12,51 +12,63 @@ INSERT INTO FLOAT4_TBL(f1) VALUES ('10e70');
 ERROR:  value out of range: overflow
 LINE 1: INSERT INTO FLOAT4_TBL(f1) VALUES ('10e70');
                                            ^
+CONTEXT:  INSERT "float4_tbl", column "f1", type real
 INSERT INTO FLOAT4_TBL(f1) VALUES ('-10e70');
 ERROR:  value out of range: overflow
 LINE 1: INSERT INTO FLOAT4_TBL(f1) VALUES ('-10e70');
                                            ^
+CONTEXT:  INSERT "float4_tbl", column "f1", type real
 INSERT INTO FLOAT4_TBL(f1) VALUES ('10e-70');
 ERROR:  value out of range: underflow
 LINE 1: INSERT INTO FLOAT4_TBL(f1) VALUES ('10e-70');
                                            ^
+CONTEXT:  INSERT "float4_tbl", column "f1", type real
 INSERT INTO FLOAT4_TBL(f1) VALUES ('-10e-70');
 ERROR:  value out of range: underflow
 LINE 1: INSERT INTO FLOAT4_TBL(f1) VALUES ('-10e-70');
                                            ^
+CONTEXT:  INSERT "float4_tbl", column "f1", type real
 -- bad input
 INSERT INTO FLOAT4_TBL(f1) VALUES ('');
 ERROR:  invalid input syntax for type real: ""
 LINE 1: INSERT INTO FLOAT4_TBL(f1) VALUES ('');
                                            ^
+CONTEXT:  INSERT "float4_tbl", column "f1", type real
 INSERT INTO FLOAT4_TBL(f1) VALUES ('       ');
 ERROR:  invalid input syntax for type real: "       "
 LINE 1: INSERT INTO FLOAT4_TBL(f1) VALUES ('       ');
                                            ^
+CONTEXT:  INSERT "float4_tbl", column "f1", type real
 INSERT INTO FLOAT4_TBL(f1) VALUES ('xyz');
 ERROR:  invalid input syntax for type real: "xyz"
 LINE 1: INSERT INTO FLOAT4_TBL(f1) VALUES ('xyz');
                                            ^
+CONTEXT:  INSERT "float4_tbl", column "f1", type real
 INSERT INTO FLOAT4_TBL(f1) VALUES ('5.0.0');
 ERROR:  invalid input syntax for type real: "5.0.0"
 LINE 1: INSERT INTO FLOAT4_TBL(f1) VALUES ('5.0.0');
                                            ^
+CONTEXT:  INSERT "float4_tbl", column "f1", type real
 INSERT INTO FLOAT4_TBL(f1) VALUES ('5 . 0');
 ERROR:  invalid input syntax for type real: "5 . 0"
 LINE 1: INSERT INTO FLOAT4_TBL(f1) VALUES ('5 . 0');
                                            ^
+CONTEXT:  INSERT "float4_tbl", column "f1", type real
 INSERT INTO FLOAT4_TBL(f1) VALUES ('5.   0');
 ERROR:  invalid input syntax for type real: "5.   0"
 LINE 1: INSERT INTO FLOAT4_TBL(f1) VALUES ('5.   0');
                                            ^
+CONTEXT:  INSERT "float4_tbl", column "f1", type real
 INSERT INTO FLOAT4_TBL(f1) VALUES ('     - 3.0');
 ERROR:  invalid input syntax for type real: "     - 3.0"
 LINE 1: INSERT INTO FLOAT4_TBL(f1) VALUES ('     - 3.0');
                                            ^
+CONTEXT:  INSERT "float4_tbl", column "f1", type real
 INSERT INTO FLOAT4_TBL(f1) VALUES ('123            5');
 ERROR:  invalid input syntax for type real: "123            5"
 LINE 1: INSERT INTO FLOAT4_TBL(f1) VALUES ('123            5');
                                            ^
+CONTEXT:  INSERT "float4_tbl", column "f1", type real
 -- special inputs
 SELECT 'NaN'::float4;
  float4 
diff --git a/src/test/regress/expected/float4.out b/src/test/regress/expected/float4.out
index fd46a4a..d479762 100644
--- a/src/test/regress/expected/float4.out
+++ b/src/test/regress/expected/float4.out
@@ -12,51 +12,63 @@ INSERT INTO FLOAT4_TBL(f1) VALUES ('10e70');
 ERROR:  value out of range: overflow
 LINE 1: INSERT INTO FLOAT4_TBL(f1) VALUES ('10e70');
                                            ^
+CONTEXT:  INSERT "float4_tbl", column "f1", type real
 INSERT INTO FLOAT4_TBL(f1) VALUES ('-10e70');
 ERROR:  value out of range: overflow
 LINE 1: INSERT INTO FLOAT4_TBL(f1) VALUES ('-10e70');
                                            ^
+CONTEXT:  INSERT "float4_tbl", column "f1", type real
 INSERT INTO FLOAT4_TBL(f1) VALUES ('10e-70');
 ERROR:  value out of range: underflow
 LINE 1: INSERT INTO FLOAT4_TBL(f1) VALUES ('10e-70');
                                            ^
+CONTEXT:  INSERT "float4_tbl", column "f1", type real
 INSERT INTO FLOAT4_TBL(f1) VALUES ('-10e-70');
 ERROR:  value out of range: underflow
 LINE 1: INSERT INTO FLOAT4_TBL(f1) VALUES ('-10e-70');
                                            ^
+CONTEXT:  INSERT "float4_tbl", column "f1", type real
 -- bad input
 INSERT INTO FLOAT4_TBL(f1) VALUES ('');
 ERROR:  invalid input syntax for type real: ""
 LINE 1: INSERT INTO FLOAT4_TBL(f1) VALUES ('');
                                            ^
+CONTEXT:  INSERT "float4_tbl", column "f1", type real
 INSERT INTO FLOAT4_TBL(f1) VALUES ('       ');
 ERROR:  invalid input syntax for type real: "       "
 LINE 1: INSERT INTO FLOAT4_TBL(f1) VALUES ('       ');
                                            ^
+CONTEXT:  INSERT "float4_tbl", column "f1", type real
 INSERT INTO FLOAT4_TBL(f1) VALUES ('xyz');
 ERROR:  invalid input syntax for type real: "xyz"
 LINE 1: INSERT INTO FLOAT4_TBL(f1) VALUES ('xyz');
                                            ^
+CONTEXT:  INSERT "float4_tbl", column "f1", type real
 INSERT INTO FLOAT4_TBL(f1) VALUES ('5.0.0');
 ERROR:  invalid input syntax for type real: "5.0.0"
 LINE 1: INSERT INTO FLOAT4_TBL(f1) VALUES ('5.0.0');
                                            ^
+CONTEXT:  INSERT "float4_tbl", column "f1", type real
 INSERT INTO FLOAT4_TBL(f1) VALUES ('5 . 0');
 ERROR:  invalid input syntax for type real: "5 . 0"
 LINE 1: INSERT INTO FLOAT4_TBL(f1) VALUES ('5 . 0');
                                            ^
+CONTEXT:  INSERT "float4_tbl", column "f1", type real
 INSERT INTO FLOAT4_TBL(f1) VALUES ('5.   0');
 ERROR:  invalid input syntax for type real: "5.   0"
 LINE 1: INSERT INTO FLOAT4_TBL(f1) VALUES ('5.   0');
                                            ^
+CONTEXT:  INSERT "float4_tbl", column "f1", type real
 INSERT INTO FLOAT4_TBL(f1) VALUES ('     - 3.0');
 ERROR:  invalid input syntax for type real: "     - 3.0"
 LINE 1: INSERT INTO FLOAT4_TBL(f1) VALUES ('     - 3.0');
                                            ^
+CONTEXT:  INSERT "float4_tbl", column "f1", type real
 INSERT INTO FLOAT4_TBL(f1) VALUES ('123            5');
 ERROR:  invalid input syntax for type real: "123            5"
 LINE 1: INSERT INTO FLOAT4_TBL(f1) VALUES ('123            5');
                                            ^
+CONTEXT:  INSERT "float4_tbl", column "f1", type real
 -- special inputs
 SELECT 'NaN'::float4;
  float4 
diff --git a/src/test/regress/expected/float8-exp-three-digits-win32.out b/src/test/regress/expected/float8-exp-three-digits-win32.out
index 7e11533..f02777a 100644
--- a/src/test/regress/expected/float8-exp-three-digits-win32.out
+++ b/src/test/regress/expected/float8-exp-three-digits-win32.out
@@ -29,34 +29,42 @@ INSERT INTO FLOAT8_TBL(f1) VALUES ('');
 ERROR:  invalid input syntax for type double precision: ""
 LINE 1: INSERT INTO FLOAT8_TBL(f1) VALUES ('');
                                            ^
+CONTEXT:  INSERT "float8_tbl", column "f1", type double precision
 INSERT INTO FLOAT8_TBL(f1) VALUES ('     ');
 ERROR:  invalid input syntax for type double precision: "     "
 LINE 1: INSERT INTO FLOAT8_TBL(f1) VALUES ('     ');
                                            ^
+CONTEXT:  INSERT "float8_tbl", column "f1", type double precision
 INSERT INTO FLOAT8_TBL(f1) VALUES ('xyz');
 ERROR:  invalid input syntax for type double precision: "xyz"
 LINE 1: INSERT INTO FLOAT8_TBL(f1) VALUES ('xyz');
                                            ^
+CONTEXT:  INSERT "float8_tbl", column "f1", type double precision
 INSERT INTO FLOAT8_TBL(f1) VALUES ('5.0.0');
 ERROR:  invalid input syntax for type double precision: "5.0.0"
 LINE 1: INSERT INTO FLOAT8_TBL(f1) VALUES ('5.0.0');
                                            ^
+CONTEXT:  INSERT "float8_tbl", column "f1", type double precision
 INSERT INTO FLOAT8_TBL(f1) VALUES ('5 . 0');
 ERROR:  invalid input syntax for type double precision: "5 . 0"
 LINE 1: INSERT INTO FLOAT8_TBL(f1) VALUES ('5 . 0');
                                            ^
+CONTEXT:  INSERT "float8_tbl", column "f1", type double precision
 INSERT INTO FLOAT8_TBL(f1) VALUES ('5.   0');
 ERROR:  invalid input syntax for type double precision: "5.   0"
 LINE 1: INSERT INTO FLOAT8_TBL(f1) VALUES ('5.   0');
                                            ^
+CONTEXT:  INSERT "float8_tbl", column "f1", type double precision
 INSERT INTO FLOAT8_TBL(f1) VALUES ('    - 3');
 ERROR:  invalid input syntax for type double precision: "    - 3"
 LINE 1: INSERT INTO FLOAT8_TBL(f1) VALUES ('    - 3');
                                            ^
+CONTEXT:  INSERT "float8_tbl", column "f1", type double precision
 INSERT INTO FLOAT8_TBL(f1) VALUES ('123           5');
 ERROR:  invalid input syntax for type double precision: "123           5"
 LINE 1: INSERT INTO FLOAT8_TBL(f1) VALUES ('123           5');
                                            ^
+CONTEXT:  INSERT "float8_tbl", column "f1", type double precision
 -- special inputs
 SELECT 'NaN'::float8;
  float8 
@@ -414,18 +422,22 @@ INSERT INTO FLOAT8_TBL(f1) VALUES ('10e400');
 ERROR:  "10e400" is out of range for type double precision
 LINE 1: INSERT INTO FLOAT8_TBL(f1) VALUES ('10e400');
                                            ^
+CONTEXT:  INSERT "float8_tbl", column "f1", type double precision
 INSERT INTO FLOAT8_TBL(f1) VALUES ('-10e400');
 ERROR:  "-10e400" is out of range for type double precision
 LINE 1: INSERT INTO FLOAT8_TBL(f1) VALUES ('-10e400');
                                            ^
+CONTEXT:  INSERT "float8_tbl", column "f1", type double precision
 INSERT INTO FLOAT8_TBL(f1) VALUES ('10e-400');
 ERROR:  "10e-400" is out of range for type double precision
 LINE 1: INSERT INTO FLOAT8_TBL(f1) VALUES ('10e-400');
                                            ^
+CONTEXT:  INSERT "float8_tbl", column "f1", type double precision
 INSERT INTO FLOAT8_TBL(f1) VALUES ('-10e-400');
 ERROR:  "-10e-400" is out of range for type double precision
 LINE 1: INSERT INTO FLOAT8_TBL(f1) VALUES ('-10e-400');
                                            ^
+CONTEXT:  INSERT "float8_tbl", column "f1", type double precision
 -- maintain external table consistency across platforms
 -- delete all values and reinsert well-behaved ones
 DELETE FROM FLOAT8_TBL;
diff --git a/src/test/regress/expected/float8-small-is-zero.out b/src/test/regress/expected/float8-small-is-zero.out
index 26b8378..44dfd36 100644
--- a/src/test/regress/expected/float8-small-is-zero.out
+++ b/src/test/regress/expected/float8-small-is-zero.out
@@ -33,34 +33,42 @@ INSERT INTO FLOAT8_TBL(f1) VALUES ('');
 ERROR:  invalid input syntax for type double precision: ""
 LINE 1: INSERT INTO FLOAT8_TBL(f1) VALUES ('');
                                            ^
+CONTEXT:  INSERT "float8_tbl", column "f1", type double precision
 INSERT INTO FLOAT8_TBL(f1) VALUES ('     ');
 ERROR:  invalid input syntax for type double precision: "     "
 LINE 1: INSERT INTO FLOAT8_TBL(f1) VALUES ('     ');
                                            ^
+CONTEXT:  INSERT "float8_tbl", column "f1", type double precision
 INSERT INTO FLOAT8_TBL(f1) VALUES ('xyz');
 ERROR:  invalid input syntax for type double precision: "xyz"
 LINE 1: INSERT INTO FLOAT8_TBL(f1) VALUES ('xyz');
                                            ^
+CONTEXT:  INSERT "float8_tbl", column "f1", type double precision
 INSERT INTO FLOAT8_TBL(f1) VALUES ('5.0.0');
 ERROR:  invalid input syntax for type double precision: "5.0.0"
 LINE 1: INSERT INTO FLOAT8_TBL(f1) VALUES ('5.0.0');
                                            ^
+CONTEXT:  INSERT "float8_tbl", column "f1", type double precision
 INSERT INTO FLOAT8_TBL(f1) VALUES ('5 . 0');
 ERROR:  invalid input syntax for type double precision: "5 . 0"
 LINE 1: INSERT INTO FLOAT8_TBL(f1) VALUES ('5 . 0');
                                            ^
+CONTEXT:  INSERT "float8_tbl", column "f1", type double precision
 INSERT INTO FLOAT8_TBL(f1) VALUES ('5.   0');
 ERROR:  invalid input syntax for type double precision: "5.   0"
 LINE 1: INSERT INTO FLOAT8_TBL(f1) VALUES ('5.   0');
                                            ^
+CONTEXT:  INSERT "float8_tbl", column "f1", type double precision
 INSERT INTO FLOAT8_TBL(f1) VALUES ('    - 3');
 ERROR:  invalid input syntax for type double precision: "    - 3"
 LINE 1: INSERT INTO FLOAT8_TBL(f1) VALUES ('    - 3');
                                            ^
+CONTEXT:  INSERT "float8_tbl", column "f1", type double precision
 INSERT INTO FLOAT8_TBL(f1) VALUES ('123           5');
 ERROR:  invalid input syntax for type double precision: "123           5"
 LINE 1: INSERT INTO FLOAT8_TBL(f1) VALUES ('123           5');
                                            ^
+CONTEXT:  INSERT "float8_tbl", column "f1", type double precision
 -- special inputs
 SELECT 'NaN'::float8;
  float8 
@@ -418,10 +426,12 @@ INSERT INTO FLOAT8_TBL(f1) VALUES ('10e400');
 ERROR:  "10e400" is out of range for type double precision
 LINE 1: INSERT INTO FLOAT8_TBL(f1) VALUES ('10e400');
                                            ^
+CONTEXT:  INSERT "float8_tbl", column "f1", type double precision
 INSERT INTO FLOAT8_TBL(f1) VALUES ('-10e400');
 ERROR:  "-10e400" is out of range for type double precision
 LINE 1: INSERT INTO FLOAT8_TBL(f1) VALUES ('-10e400');
                                            ^
+CONTEXT:  INSERT "float8_tbl", column "f1", type double precision
 INSERT INTO FLOAT8_TBL(f1) VALUES ('10e-400');
 INSERT INTO FLOAT8_TBL(f1) VALUES ('-10e-400');
 -- maintain external table consistency across platforms
diff --git a/src/test/regress/expected/float8-small-is-zero_1.out b/src/test/regress/expected/float8-small-is-zero_1.out
index cea2790..45bd9cb 100644
--- a/src/test/regress/expected/float8-small-is-zero_1.out
+++ b/src/test/regress/expected/float8-small-is-zero_1.out
@@ -33,34 +33,42 @@ INSERT INTO FLOAT8_TBL(f1) VALUES ('');
 ERROR:  invalid input syntax for type double precision: ""
 LINE 1: INSERT INTO FLOAT8_TBL(f1) VALUES ('');
                                            ^
+CONTEXT:  INSERT "float8_tbl", column "f1", type double precision
 INSERT INTO FLOAT8_TBL(f1) VALUES ('     ');
 ERROR:  invalid input syntax for type double precision: "     "
 LINE 1: INSERT INTO FLOAT8_TBL(f1) VALUES ('     ');
                                            ^
+CONTEXT:  INSERT "float8_tbl", column "f1", type double precision
 INSERT INTO FLOAT8_TBL(f1) VALUES ('xyz');
 ERROR:  invalid input syntax for type double precision: "xyz"
 LINE 1: INSERT INTO FLOAT8_TBL(f1) VALUES ('xyz');
                                            ^
+CONTEXT:  INSERT "float8_tbl", column "f1", type double precision
 INSERT INTO FLOAT8_TBL(f1) VALUES ('5.0.0');
 ERROR:  invalid input syntax for type double precision: "5.0.0"
 LINE 1: INSERT INTO FLOAT8_TBL(f1) VALUES ('5.0.0');
                                            ^
+CONTEXT:  INSERT "float8_tbl", column "f1", type double precision
 INSERT INTO FLOAT8_TBL(f1) VALUES ('5 . 0');
 ERROR:  invalid input syntax for type double precision: "5 . 0"
 LINE 1: INSERT INTO FLOAT8_TBL(f1) VALUES ('5 . 0');
                                            ^
+CONTEXT:  INSERT "float8_tbl", column "f1", type double precision
 INSERT INTO FLOAT8_TBL(f1) VALUES ('5.   0');
 ERROR:  invalid input syntax for type double precision: "5.   0"
 LINE 1: INSERT INTO FLOAT8_TBL(f1) VALUES ('5.   0');
                                            ^
+CONTEXT:  INSERT "float8_tbl", column "f1", type double precision
 INSERT INTO FLOAT8_TBL(f1) VALUES ('    - 3');
 ERROR:  invalid input syntax for type double precision: "    - 3"
 LINE 1: INSERT INTO FLOAT8_TBL(f1) VALUES ('    - 3');
                                            ^
+CONTEXT:  INSERT "float8_tbl", column "f1", type double precision
 INSERT INTO FLOAT8_TBL(f1) VALUES ('123           5');
 ERROR:  invalid input syntax for type double precision: "123           5"
 LINE 1: INSERT INTO FLOAT8_TBL(f1) VALUES ('123           5');
                                            ^
+CONTEXT:  INSERT "float8_tbl", column "f1", type double precision
 -- special inputs
 SELECT 'NaN'::float8;
  float8 
@@ -418,10 +426,12 @@ INSERT INTO FLOAT8_TBL(f1) VALUES ('10e400');
 ERROR:  "10e400" is out of range for type double precision
 LINE 1: INSERT INTO FLOAT8_TBL(f1) VALUES ('10e400');
                                            ^
+CONTEXT:  INSERT "float8_tbl", column "f1", type double precision
 INSERT INTO FLOAT8_TBL(f1) VALUES ('-10e400');
 ERROR:  "-10e400" is out of range for type double precision
 LINE 1: INSERT INTO FLOAT8_TBL(f1) VALUES ('-10e400');
                                            ^
+CONTEXT:  INSERT "float8_tbl", column "f1", type double precision
 INSERT INTO FLOAT8_TBL(f1) VALUES ('10e-400');
 INSERT INTO FLOAT8_TBL(f1) VALUES ('-10e-400');
 -- maintain external table consistency across platforms
diff --git a/src/test/regress/expected/float8.out b/src/test/regress/expected/float8.out
index 20c985e..4a086be 100644
--- a/src/test/regress/expected/float8.out
+++ b/src/test/regress/expected/float8.out
@@ -29,34 +29,42 @@ INSERT INTO FLOAT8_TBL(f1) VALUES ('');
 ERROR:  invalid input syntax for type double precision: ""
 LINE 1: INSERT INTO FLOAT8_TBL(f1) VALUES ('');
                                            ^
+CONTEXT:  INSERT "float8_tbl", column "f1", type double precision
 INSERT INTO FLOAT8_TBL(f1) VALUES ('     ');
 ERROR:  invalid input syntax for type double precision: "     "
 LINE 1: INSERT INTO FLOAT8_TBL(f1) VALUES ('     ');
                                            ^
+CONTEXT:  INSERT "float8_tbl", column "f1", type double precision
 INSERT INTO FLOAT8_TBL(f1) VALUES ('xyz');
 ERROR:  invalid input syntax for type double precision: "xyz"
 LINE 1: INSERT INTO FLOAT8_TBL(f1) VALUES ('xyz');
                                            ^
+CONTEXT:  INSERT "float8_tbl", column "f1", type double precision
 INSERT INTO FLOAT8_TBL(f1) VALUES ('5.0.0');
 ERROR:  invalid input syntax for type double precision: "5.0.0"
 LINE 1: INSERT INTO FLOAT8_TBL(f1) VALUES ('5.0.0');
                                            ^
+CONTEXT:  INSERT "float8_tbl", column "f1", type double precision
 INSERT INTO FLOAT8_TBL(f1) VALUES ('5 . 0');
 ERROR:  invalid input syntax for type double precision: "5 . 0"
 LINE 1: INSERT INTO FLOAT8_TBL(f1) VALUES ('5 . 0');
                                            ^
+CONTEXT:  INSERT "float8_tbl", column "f1", type double precision
 INSERT INTO FLOAT8_TBL(f1) VALUES ('5.   0');
 ERROR:  invalid input syntax for type double precision: "5.   0"
 LINE 1: INSERT INTO FLOAT8_TBL(f1) VALUES ('5.   0');
                                            ^
+CONTEXT:  INSERT "float8_tbl", column "f1", type double precision
 INSERT INTO FLOAT8_TBL(f1) VALUES ('    - 3');
 ERROR:  invalid input syntax for type double precision: "    - 3"
 LINE 1: INSERT INTO FLOAT8_TBL(f1) VALUES ('    - 3');
                                            ^
+CONTEXT:  INSERT "float8_tbl", column "f1", type double precision
 INSERT INTO FLOAT8_TBL(f1) VALUES ('123           5');
 ERROR:  invalid input syntax for type double precision: "123           5"
 LINE 1: INSERT INTO FLOAT8_TBL(f1) VALUES ('123           5');
                                            ^
+CONTEXT:  INSERT "float8_tbl", column "f1", type double precision
 -- special inputs
 SELECT 'NaN'::float8;
  float8 
@@ -414,18 +422,22 @@ INSERT INTO FLOAT8_TBL(f1) VALUES ('10e400');
 ERROR:  "10e400" is out of range for type double precision
 LINE 1: INSERT INTO FLOAT8_TBL(f1) VALUES ('10e400');
                                            ^
+CONTEXT:  INSERT "float8_tbl", column "f1", type double precision
 INSERT INTO FLOAT8_TBL(f1) VALUES ('-10e400');
 ERROR:  "-10e400" is out of range for type double precision
 LINE 1: INSERT INTO FLOAT8_TBL(f1) VALUES ('-10e400');
                                            ^
+CONTEXT:  INSERT "float8_tbl", column "f1", type double precision
 INSERT INTO FLOAT8_TBL(f1) VALUES ('10e-400');
 ERROR:  "10e-400" is out of range for type double precision
 LINE 1: INSERT INTO FLOAT8_TBL(f1) VALUES ('10e-400');
                                            ^
+CONTEXT:  INSERT "float8_tbl", column "f1", type double precision
 INSERT INTO FLOAT8_TBL(f1) VALUES ('-10e-400');
 ERROR:  "-10e-400" is out of range for type double precision
 LINE 1: INSERT INTO FLOAT8_TBL(f1) VALUES ('-10e-400');
                                            ^
+CONTEXT:  INSERT "float8_tbl", column "f1", type double precision
 -- maintain external table consistency across platforms
 -- delete all values and reinsert well-behaved ones
 DELETE FROM FLOAT8_TBL;
diff --git a/src/test/regress/expected/inet.out b/src/test/regress/expected/inet.out
index be9427e..15fd6bf 100644
--- a/src/test/regress/expected/inet.out
+++ b/src/test/regress/expected/inet.out
@@ -28,10 +28,12 @@ ERROR:  invalid cidr value: "192.168.1.2/30"
 LINE 1: INSERT INTO INET_TBL (c, i) VALUES ('192.168.1.2/30', '192.1...
                                             ^
 DETAIL:  Value has bits set to right of mask.
+CONTEXT:  INSERT "inet_tbl", column "c", type cidr
 INSERT INTO INET_TBL (c, i) VALUES ('1234::1234::1234', '::1.2.3.4');
 ERROR:  invalid input syntax for type cidr: "1234::1234::1234"
 LINE 1: INSERT INTO INET_TBL (c, i) VALUES ('1234::1234::1234', '::1...
                                             ^
+CONTEXT:  INSERT "inet_tbl", column "c", type cidr
 -- check that CIDR rejects invalid input when converting from text:
 INSERT INTO INET_TBL (c, i) VALUES (cidr('192.168.1.2/30'), '192.168.1.226');
 ERROR:  invalid cidr value: "192.168.1.2/30"
diff --git a/src/test/regress/expected/insert.out b/src/test/regress/expected/insert.out
index 70107b5..cd054dd 100644
--- a/src/test/regress/expected/insert.out
+++ b/src/test/regress/expected/insert.out
@@ -96,6 +96,7 @@ insert into inserttest (f2[1], f2[2]) values (1,default);  -- not supported
 ERROR:  cannot set an array element to DEFAULT
 LINE 1: insert into inserttest (f2[1], f2[2]) values (1,default);
                                        ^
+CONTEXT:  INSERT "inserttest", column "f2", type integer[]
 insert into inserttest (f3.if1, f3.if2) values (1,array['foo']);
 insert into inserttest (f3.if1, f3.if2) values (1,'{foo}'), (2,'{bar}');
 insert into inserttest (f3.if1, f3.if2) select 3, '{baz,quux}';
@@ -103,6 +104,7 @@ insert into inserttest (f3.if1, f3.if2) values (1,default);  -- not supported
 ERROR:  cannot set a subfield to DEFAULT
 LINE 1: insert into inserttest (f3.if1, f3.if2) values (1,default);
                                         ^
+CONTEXT:  INSERT "inserttest", column "f3", type insert_test_type
 insert into inserttest (f3.if2[1], f3.if2[2]) values ('foo', 'bar');
 insert into inserttest (f3.if2[1], f3.if2[2]) values ('foo', 'bar'), ('baz', 'quux');
 insert into inserttest (f3.if2[1], f3.if2[2]) select 'bear', 'beer';
diff --git a/src/test/regress/expected/int2.out b/src/test/regress/expected/int2.out
index 3ea4ed9..2ece418 100644
--- a/src/test/regress/expected/int2.out
+++ b/src/test/regress/expected/int2.out
@@ -9,6 +9,7 @@ INSERT INTO INT2_TBL(f1) VALUES ('34.5');
 ERROR:  invalid input syntax for integer: "34.5"
 LINE 1: INSERT INTO INT2_TBL(f1) VALUES ('34.5');
                                          ^
+CONTEXT:  INSERT "int2_tbl", column "f1", type smallint
 -- largest and smallest values
 INSERT INTO INT2_TBL(f1) VALUES ('32767');
 INSERT INTO INT2_TBL(f1) VALUES ('-32767');
@@ -17,30 +18,37 @@ INSERT INTO INT2_TBL(f1) VALUES ('100000');
 ERROR:  value "100000" is out of range for type smallint
 LINE 1: INSERT INTO INT2_TBL(f1) VALUES ('100000');
                                          ^
+CONTEXT:  INSERT "int2_tbl", column "f1", type smallint
 INSERT INTO INT2_TBL(f1) VALUES ('asdf');
 ERROR:  invalid input syntax for integer: "asdf"
 LINE 1: INSERT INTO INT2_TBL(f1) VALUES ('asdf');
                                          ^
+CONTEXT:  INSERT "int2_tbl", column "f1", type smallint
 INSERT INTO INT2_TBL(f1) VALUES ('    ');
 ERROR:  invalid input syntax for integer: "    "
 LINE 1: INSERT INTO INT2_TBL(f1) VALUES ('    ');
                                          ^
+CONTEXT:  INSERT "int2_tbl", column "f1", type smallint
 INSERT INTO INT2_TBL(f1) VALUES ('- 1234');
 ERROR:  invalid input syntax for integer: "- 1234"
 LINE 1: INSERT INTO INT2_TBL(f1) VALUES ('- 1234');
                                          ^
+CONTEXT:  INSERT "int2_tbl", column "f1", type smallint
 INSERT INTO INT2_TBL(f1) VALUES ('4 444');
 ERROR:  invalid input syntax for integer: "4 444"
 LINE 1: INSERT INTO INT2_TBL(f1) VALUES ('4 444');
                                          ^
+CONTEXT:  INSERT "int2_tbl", column "f1", type smallint
 INSERT INTO INT2_TBL(f1) VALUES ('123 dt');
 ERROR:  invalid input syntax for integer: "123 dt"
 LINE 1: INSERT INTO INT2_TBL(f1) VALUES ('123 dt');
                                          ^
+CONTEXT:  INSERT "int2_tbl", column "f1", type smallint
 INSERT INTO INT2_TBL(f1) VALUES ('');
 ERROR:  invalid input syntax for integer: ""
 LINE 1: INSERT INTO INT2_TBL(f1) VALUES ('');
                                          ^
+CONTEXT:  INSERT "int2_tbl", column "f1", type smallint
 SELECT '' AS five, * FROM INT2_TBL;
  five |   f1   
 ------+--------
diff --git a/src/test/regress/expected/int4.out b/src/test/regress/expected/int4.out
index 372fd4d..e0d0fc2 100644
--- a/src/test/regress/expected/int4.out
+++ b/src/test/regress/expected/int4.out
@@ -9,6 +9,7 @@ INSERT INTO INT4_TBL(f1) VALUES ('34.5');
 ERROR:  invalid input syntax for integer: "34.5"
 LINE 1: INSERT INTO INT4_TBL(f1) VALUES ('34.5');
                                          ^
+CONTEXT:  INSERT "int4_tbl", column "f1", type integer
 -- largest and smallest values
 INSERT INTO INT4_TBL(f1) VALUES ('2147483647');
 INSERT INTO INT4_TBL(f1) VALUES ('-2147483647');
@@ -17,30 +18,37 @@ INSERT INTO INT4_TBL(f1) VALUES ('1000000000000');
 ERROR:  value "1000000000000" is out of range for type integer
 LINE 1: INSERT INTO INT4_TBL(f1) VALUES ('1000000000000');
                                          ^
+CONTEXT:  INSERT "int4_tbl", column "f1", type integer
 INSERT INTO INT4_TBL(f1) VALUES ('asdf');
 ERROR:  invalid input syntax for integer: "asdf"
 LINE 1: INSERT INTO INT4_TBL(f1) VALUES ('asdf');
                                          ^
+CONTEXT:  INSERT "int4_tbl", column "f1", type integer
 INSERT INTO INT4_TBL(f1) VALUES ('     ');
 ERROR:  invalid input syntax for integer: "     "
 LINE 1: INSERT INTO INT4_TBL(f1) VALUES ('     ');
                                          ^
+CONTEXT:  INSERT "int4_tbl", column "f1", type integer
 INSERT INTO INT4_TBL(f1) VALUES ('   asdf   ');
 ERROR:  invalid input syntax for integer: "   asdf   "
 LINE 1: INSERT INTO INT4_TBL(f1) VALUES ('   asdf   ');
                                          ^
+CONTEXT:  INSERT "int4_tbl", column "f1", type integer
 INSERT INTO INT4_TBL(f1) VALUES ('- 1234');
 ERROR:  invalid input syntax for integer: "- 1234"
 LINE 1: INSERT INTO INT4_TBL(f1) VALUES ('- 1234');
                                          ^
+CONTEXT:  INSERT "int4_tbl", column "f1", type integer
 INSERT INTO INT4_TBL(f1) VALUES ('123       5');
 ERROR:  invalid input syntax for integer: "123       5"
 LINE 1: INSERT INTO INT4_TBL(f1) VALUES ('123       5');
                                          ^
+CONTEXT:  INSERT "int4_tbl", column "f1", type integer
 INSERT INTO INT4_TBL(f1) VALUES ('');
 ERROR:  invalid input syntax for integer: ""
 LINE 1: INSERT INTO INT4_TBL(f1) VALUES ('');
                                          ^
+CONTEXT:  INSERT "int4_tbl", column "f1", type integer
 SELECT '' AS five, * FROM INT4_TBL;
  five |     f1      
 ------+-------------
diff --git a/src/test/regress/expected/int8-exp-three-digits.out b/src/test/regress/expected/int8-exp-three-digits.out
index 7ad4dce..a17be9a 100644
--- a/src/test/regress/expected/int8-exp-three-digits.out
+++ b/src/test/regress/expected/int8-exp-three-digits.out
@@ -13,30 +13,37 @@ INSERT INTO INT8_TBL(q1) VALUES ('      ');
 ERROR:  invalid input syntax for integer: "      "
 LINE 1: INSERT INTO INT8_TBL(q1) VALUES ('      ');
                                          ^
+CONTEXT:  INSERT "int8_tbl", column "q1", type bigint
 INSERT INTO INT8_TBL(q1) VALUES ('xxx');
 ERROR:  invalid input syntax for integer: "xxx"
 LINE 1: INSERT INTO INT8_TBL(q1) VALUES ('xxx');
                                          ^
+CONTEXT:  INSERT "int8_tbl", column "q1", type bigint
 INSERT INTO INT8_TBL(q1) VALUES ('3908203590239580293850293850329485');
 ERROR:  value "3908203590239580293850293850329485" is out of range for type bigint
 LINE 1: INSERT INTO INT8_TBL(q1) VALUES ('39082035902395802938502938...
                                          ^
+CONTEXT:  INSERT "int8_tbl", column "q1", type bigint
 INSERT INTO INT8_TBL(q1) VALUES ('-1204982019841029840928340329840934');
 ERROR:  value "-1204982019841029840928340329840934" is out of range for type bigint
 LINE 1: INSERT INTO INT8_TBL(q1) VALUES ('-1204982019841029840928340...
                                          ^
+CONTEXT:  INSERT "int8_tbl", column "q1", type bigint
 INSERT INTO INT8_TBL(q1) VALUES ('- 123');
 ERROR:  invalid input syntax for integer: "- 123"
 LINE 1: INSERT INTO INT8_TBL(q1) VALUES ('- 123');
                                          ^
+CONTEXT:  INSERT "int8_tbl", column "q1", type bigint
 INSERT INTO INT8_TBL(q1) VALUES ('  345     5');
 ERROR:  invalid input syntax for integer: "  345     5"
 LINE 1: INSERT INTO INT8_TBL(q1) VALUES ('  345     5');
                                          ^
+CONTEXT:  INSERT "int8_tbl", column "q1", type bigint
 INSERT INTO INT8_TBL(q1) VALUES ('');
 ERROR:  invalid input syntax for integer: ""
 LINE 1: INSERT INTO INT8_TBL(q1) VALUES ('');
                                          ^
+CONTEXT:  INSERT "int8_tbl", column "q1", type bigint
 SELECT * FROM INT8_TBL;
         q1        |        q2         
 ------------------+-------------------
diff --git a/src/test/regress/expected/int8.out b/src/test/regress/expected/int8.out
index ed0bd34..a311675 100644
--- a/src/test/regress/expected/int8.out
+++ b/src/test/regress/expected/int8.out
@@ -13,30 +13,37 @@ INSERT INTO INT8_TBL(q1) VALUES ('      ');
 ERROR:  invalid input syntax for integer: "      "
 LINE 1: INSERT INTO INT8_TBL(q1) VALUES ('      ');
                                          ^
+CONTEXT:  INSERT "int8_tbl", column "q1", type bigint
 INSERT INTO INT8_TBL(q1) VALUES ('xxx');
 ERROR:  invalid input syntax for integer: "xxx"
 LINE 1: INSERT INTO INT8_TBL(q1) VALUES ('xxx');
                                          ^
+CONTEXT:  INSERT "int8_tbl", column "q1", type bigint
 INSERT INTO INT8_TBL(q1) VALUES ('3908203590239580293850293850329485');
 ERROR:  value "3908203590239580293850293850329485" is out of range for type bigint
 LINE 1: INSERT INTO INT8_TBL(q1) VALUES ('39082035902395802938502938...
                                          ^
+CONTEXT:  INSERT "int8_tbl", column "q1", type bigint
 INSERT INTO INT8_TBL(q1) VALUES ('-1204982019841029840928340329840934');
 ERROR:  value "-1204982019841029840928340329840934" is out of range for type bigint
 LINE 1: INSERT INTO INT8_TBL(q1) VALUES ('-1204982019841029840928340...
                                          ^
+CONTEXT:  INSERT "int8_tbl", column "q1", type bigint
 INSERT INTO INT8_TBL(q1) VALUES ('- 123');
 ERROR:  invalid input syntax for integer: "- 123"
 LINE 1: INSERT INTO INT8_TBL(q1) VALUES ('- 123');
                                          ^
+CONTEXT:  INSERT "int8_tbl", column "q1", type bigint
 INSERT INTO INT8_TBL(q1) VALUES ('  345     5');
 ERROR:  invalid input syntax for integer: "  345     5"
 LINE 1: INSERT INTO INT8_TBL(q1) VALUES ('  345     5');
                                          ^
+CONTEXT:  INSERT "int8_tbl", column "q1", type bigint
 INSERT INTO INT8_TBL(q1) VALUES ('');
 ERROR:  invalid input syntax for integer: ""
 LINE 1: INSERT INTO INT8_TBL(q1) VALUES ('');
                                          ^
+CONTEXT:  INSERT "int8_tbl", column "q1", type bigint
 SELECT * FROM INT8_TBL;
         q1        |        q2         
 ------------------+-------------------
diff --git a/src/test/regress/expected/interval.out b/src/test/regress/expected/interval.out
index c873a99..66d7c18 100644
--- a/src/test/regress/expected/interval.out
+++ b/src/test/regress/expected/interval.out
@@ -68,10 +68,12 @@ INSERT INTO INTERVAL_TBL (f1) VALUES ('badly formatted interval');
 ERROR:  invalid input syntax for type interval: "badly formatted interval"
 LINE 1: INSERT INTO INTERVAL_TBL (f1) VALUES ('badly formatted inter...
                                               ^
+CONTEXT:  INSERT "interval_tbl", column "f1", type interval
 INSERT INTO INTERVAL_TBL (f1) VALUES ('@ 30 eons ago');
 ERROR:  invalid input syntax for type interval: "@ 30 eons ago"
 LINE 1: INSERT INTO INTERVAL_TBL (f1) VALUES ('@ 30 eons ago');
                                               ^
+CONTEXT:  INSERT "interval_tbl", column "f1", type interval
 -- test interval operators
 SELECT '' AS ten, * FROM INTERVAL_TBL;
  ten |       f1        
diff --git a/src/test/regress/expected/line.out b/src/test/regress/expected/line.out
index f20abdc..26020f2 100644
--- a/src/test/regress/expected/line.out
+++ b/src/test/regress/expected/line.out
@@ -13,6 +13,7 @@ INSERT INTO LINE_TBL VALUES ('[(1,0),(1,0)]');
 ERROR:  invalid line specification: must be two distinct points
 LINE 1: INSERT INTO LINE_TBL VALUES ('[(1,0),(1,0)]');
                                      ^
+CONTEXT:  INSERT "line_tbl", column "s", type line
 -- horizontal
 INSERT INTO LINE_TBL VALUES ('[(1,3),(2,3)]');
 -- vertical
@@ -22,22 +23,27 @@ INSERT INTO LINE_TBL VALUES ('{0,0,1}');
 ERROR:  invalid line specification: A and B cannot both be zero
 LINE 1: INSERT INTO LINE_TBL VALUES ('{0,0,1}');
                                      ^
+CONTEXT:  INSERT "line_tbl", column "s", type line
 INSERT INTO LINE_TBL VALUES ('(3asdf,2 ,3,4r2)');
 ERROR:  invalid input syntax for type line: "(3asdf,2 ,3,4r2)"
 LINE 1: INSERT INTO LINE_TBL VALUES ('(3asdf,2 ,3,4r2)');
                                      ^
+CONTEXT:  INSERT "line_tbl", column "s", type line
 INSERT INTO LINE_TBL VALUES ('[1,2,3, 4');
 ERROR:  invalid input syntax for type line: "[1,2,3, 4"
 LINE 1: INSERT INTO LINE_TBL VALUES ('[1,2,3, 4');
                                      ^
+CONTEXT:  INSERT "line_tbl", column "s", type line
 INSERT INTO LINE_TBL VALUES ('[(,2),(3,4)]');
 ERROR:  invalid input syntax for type line: "[(,2),(3,4)]"
 LINE 1: INSERT INTO LINE_TBL VALUES ('[(,2),(3,4)]');
                                      ^
+CONTEXT:  INSERT "line_tbl", column "s", type line
 INSERT INTO LINE_TBL VALUES ('[(1,2),(3,4)');
 ERROR:  invalid input syntax for type line: "[(1,2),(3,4)"
 LINE 1: INSERT INTO LINE_TBL VALUES ('[(1,2),(3,4)');
                                      ^
+CONTEXT:  INSERT "line_tbl", column "s", type line
 select * from LINE_TBL;
                       s                      
 ---------------------------------------------
diff --git a/src/test/regress/expected/lseg.out b/src/test/regress/expected/lseg.out
index bba1f3e..5b1602b 100644
--- a/src/test/regress/expected/lseg.out
+++ b/src/test/regress/expected/lseg.out
@@ -14,18 +14,22 @@ INSERT INTO LSEG_TBL VALUES ('(3asdf,2 ,3,4r2)');
 ERROR:  invalid input syntax for type lseg: "(3asdf,2 ,3,4r2)"
 LINE 1: INSERT INTO LSEG_TBL VALUES ('(3asdf,2 ,3,4r2)');
                                      ^
+CONTEXT:  INSERT "lseg_tbl", column "s", type lseg
 INSERT INTO LSEG_TBL VALUES ('[1,2,3, 4');
 ERROR:  invalid input syntax for type lseg: "[1,2,3, 4"
 LINE 1: INSERT INTO LSEG_TBL VALUES ('[1,2,3, 4');
                                      ^
+CONTEXT:  INSERT "lseg_tbl", column "s", type lseg
 INSERT INTO LSEG_TBL VALUES ('[(,2),(3,4)]');
 ERROR:  invalid input syntax for type lseg: "[(,2),(3,4)]"
 LINE 1: INSERT INTO LSEG_TBL VALUES ('[(,2),(3,4)]');
                                      ^
+CONTEXT:  INSERT "lseg_tbl", column "s", type lseg
 INSERT INTO LSEG_TBL VALUES ('[(1,2),(3,4)');
 ERROR:  invalid input syntax for type lseg: "[(1,2),(3,4)"
 LINE 1: INSERT INTO LSEG_TBL VALUES ('[(1,2),(3,4)');
                                      ^
+CONTEXT:  INSERT "lseg_tbl", column "s", type lseg
 select * from LSEG_TBL;
                s               
 -------------------------------
diff --git a/src/test/regress/expected/macaddr.out b/src/test/regress/expected/macaddr.out
index e84ff5f..fc64f00 100644
--- a/src/test/regress/expected/macaddr.out
+++ b/src/test/regress/expected/macaddr.out
@@ -13,10 +13,12 @@ INSERT INTO macaddr_data VALUES (8, '0800:2b01:0203'); -- invalid
 ERROR:  invalid input syntax for type macaddr: "0800:2b01:0203"
 LINE 1: INSERT INTO macaddr_data VALUES (8, '0800:2b01:0203');
                                             ^
+CONTEXT:  INSERT "macaddr_data", column "b", type macaddr
 INSERT INTO macaddr_data VALUES (9, 'not even close'); -- invalid
 ERROR:  invalid input syntax for type macaddr: "not even close"
 LINE 1: INSERT INTO macaddr_data VALUES (9, 'not even close');
                                             ^
+CONTEXT:  INSERT "macaddr_data", column "b", type macaddr
 INSERT INTO macaddr_data VALUES (10, '08:00:2b:01:02:04');
 INSERT INTO macaddr_data VALUES (11, '08:00:2b:01:02:02');
 INSERT INTO macaddr_data VALUES (12, '08:00:2a:01:02:03');
diff --git a/src/test/regress/expected/numeric.out b/src/test/regress/expected/numeric.out
index ae0beb9..f7e0bee 100644
--- a/src/test/regress/expected/numeric.out
+++ b/src/test/regress/expected/numeric.out
@@ -1293,34 +1293,42 @@ INSERT INTO num_input_test(n1) VALUES ('     ');
 ERROR:  invalid input syntax for type numeric: "     "
 LINE 1: INSERT INTO num_input_test(n1) VALUES ('     ');
                                                ^
+CONTEXT:  INSERT "num_input_test", column "n1", type numeric
 INSERT INTO num_input_test(n1) VALUES ('   1234   %');
 ERROR:  invalid input syntax for type numeric: "   1234   %"
 LINE 1: INSERT INTO num_input_test(n1) VALUES ('   1234   %');
                                                ^
+CONTEXT:  INSERT "num_input_test", column "n1", type numeric
 INSERT INTO num_input_test(n1) VALUES ('xyz');
 ERROR:  invalid input syntax for type numeric: "xyz"
 LINE 1: INSERT INTO num_input_test(n1) VALUES ('xyz');
                                                ^
+CONTEXT:  INSERT "num_input_test", column "n1", type numeric
 INSERT INTO num_input_test(n1) VALUES ('- 1234');
 ERROR:  invalid input syntax for type numeric: "- 1234"
 LINE 1: INSERT INTO num_input_test(n1) VALUES ('- 1234');
                                                ^
+CONTEXT:  INSERT "num_input_test", column "n1", type numeric
 INSERT INTO num_input_test(n1) VALUES ('5 . 0');
 ERROR:  invalid input syntax for type numeric: "5 . 0"
 LINE 1: INSERT INTO num_input_test(n1) VALUES ('5 . 0');
                                                ^
+CONTEXT:  INSERT "num_input_test", column "n1", type numeric
 INSERT INTO num_input_test(n1) VALUES ('5. 0   ');
 ERROR:  invalid input syntax for type numeric: "5. 0   "
 LINE 1: INSERT INTO num_input_test(n1) VALUES ('5. 0   ');
                                                ^
+CONTEXT:  INSERT "num_input_test", column "n1", type numeric
 INSERT INTO num_input_test(n1) VALUES ('');
 ERROR:  invalid input syntax for type numeric: ""
 LINE 1: INSERT INTO num_input_test(n1) VALUES ('');
                                                ^
+CONTEXT:  INSERT "num_input_test", column "n1", type numeric
 INSERT INTO num_input_test(n1) VALUES (' N aN ');
 ERROR:  invalid input syntax for type numeric: " N aN "
 LINE 1: INSERT INTO num_input_test(n1) VALUES (' N aN ');
                                                ^
+CONTEXT:  INSERT "num_input_test", column "n1", type numeric
 SELECT * FROM num_input_test;
    n1    
 ---------
diff --git a/src/test/regress/expected/oid.out b/src/test/regress/expected/oid.out
index 1eab9cc..0c7a984 100644
--- a/src/test/regress/expected/oid.out
+++ b/src/test/regress/expected/oid.out
@@ -16,42 +16,52 @@ INSERT INTO OID_TBL(f1) VALUES ('');
 ERROR:  invalid input syntax for type oid: ""
 LINE 1: INSERT INTO OID_TBL(f1) VALUES ('');
                                         ^
+CONTEXT:  INSERT "oid_tbl", column "f1", type oid
 INSERT INTO OID_TBL(f1) VALUES ('    ');
 ERROR:  invalid input syntax for type oid: "    "
 LINE 1: INSERT INTO OID_TBL(f1) VALUES ('    ');
                                         ^
+CONTEXT:  INSERT "oid_tbl", column "f1", type oid
 INSERT INTO OID_TBL(f1) VALUES ('asdfasd');
 ERROR:  invalid input syntax for type oid: "asdfasd"
 LINE 1: INSERT INTO OID_TBL(f1) VALUES ('asdfasd');
                                         ^
+CONTEXT:  INSERT "oid_tbl", column "f1", type oid
 INSERT INTO OID_TBL(f1) VALUES ('99asdfasd');
 ERROR:  invalid input syntax for type oid: "99asdfasd"
 LINE 1: INSERT INTO OID_TBL(f1) VALUES ('99asdfasd');
                                         ^
+CONTEXT:  INSERT "oid_tbl", column "f1", type oid
 INSERT INTO OID_TBL(f1) VALUES ('5    d');
 ERROR:  invalid input syntax for type oid: "5    d"
 LINE 1: INSERT INTO OID_TBL(f1) VALUES ('5    d');
                                         ^
+CONTEXT:  INSERT "oid_tbl", column "f1", type oid
 INSERT INTO OID_TBL(f1) VALUES ('    5d');
 ERROR:  invalid input syntax for type oid: "    5d"
 LINE 1: INSERT INTO OID_TBL(f1) VALUES ('    5d');
                                         ^
+CONTEXT:  INSERT "oid_tbl", column "f1", type oid
 INSERT INTO OID_TBL(f1) VALUES ('5    5');
 ERROR:  invalid input syntax for type oid: "5    5"
 LINE 1: INSERT INTO OID_TBL(f1) VALUES ('5    5');
                                         ^
+CONTEXT:  INSERT "oid_tbl", column "f1", type oid
 INSERT INTO OID_TBL(f1) VALUES (' - 500');
 ERROR:  invalid input syntax for type oid: " - 500"
 LINE 1: INSERT INTO OID_TBL(f1) VALUES (' - 500');
                                         ^
+CONTEXT:  INSERT "oid_tbl", column "f1", type oid
 INSERT INTO OID_TBL(f1) VALUES ('32958209582039852935');
 ERROR:  value "32958209582039852935" is out of range for type oid
 LINE 1: INSERT INTO OID_TBL(f1) VALUES ('32958209582039852935');
                                         ^
+CONTEXT:  INSERT "oid_tbl", column "f1", type oid
 INSERT INTO OID_TBL(f1) VALUES ('-23582358720398502385');
 ERROR:  value "-23582358720398502385" is out of range for type oid
 LINE 1: INSERT INTO OID_TBL(f1) VALUES ('-23582358720398502385');
                                         ^
+CONTEXT:  INSERT "oid_tbl", column "f1", type oid
 SELECT '' AS six, * FROM OID_TBL;
  six |     f1     
 -----+------------
diff --git a/src/test/regress/expected/path.out b/src/test/regress/expected/path.out
index 08d6d61..7f017da 100644
--- a/src/test/regress/expected/path.out
+++ b/src/test/regress/expected/path.out
@@ -16,10 +16,12 @@ INSERT INTO PATH_TBL VALUES ('[(,2),(3,4)]');
 ERROR:  invalid input syntax for type path: "[(,2),(3,4)]"
 LINE 1: INSERT INTO PATH_TBL VALUES ('[(,2),(3,4)]');
                                      ^
+CONTEXT:  INSERT "path_tbl", column "f1", type path
 INSERT INTO PATH_TBL VALUES ('[(1,2),(3,4)');
 ERROR:  invalid input syntax for type path: "[(1,2),(3,4)"
 LINE 1: INSERT INTO PATH_TBL VALUES ('[(1,2),(3,4)');
                                      ^
+CONTEXT:  INSERT "path_tbl", column "f1", type path
 SELECT f1 FROM PATH_TBL;
             f1             
 ---------------------------
diff --git a/src/test/regress/expected/pg_lsn.out b/src/test/regress/expected/pg_lsn.out
index 2854cfd..6211af4 100644
--- a/src/test/regress/expected/pg_lsn.out
+++ b/src/test/regress/expected/pg_lsn.out
@@ -10,22 +10,27 @@ INSERT INTO PG_LSN_TBL VALUES ('G/0');
 ERROR:  invalid input syntax for type pg_lsn: "G/0"
 LINE 1: INSERT INTO PG_LSN_TBL VALUES ('G/0');
                                        ^
+CONTEXT:  INSERT "pg_lsn_tbl", column "f1", type pg_lsn
 INSERT INTO PG_LSN_TBL VALUES ('-1/0');
 ERROR:  invalid input syntax for type pg_lsn: "-1/0"
 LINE 1: INSERT INTO PG_LSN_TBL VALUES ('-1/0');
                                        ^
+CONTEXT:  INSERT "pg_lsn_tbl", column "f1", type pg_lsn
 INSERT INTO PG_LSN_TBL VALUES (' 0/12345678');
 ERROR:  invalid input syntax for type pg_lsn: " 0/12345678"
 LINE 1: INSERT INTO PG_LSN_TBL VALUES (' 0/12345678');
                                        ^
+CONTEXT:  INSERT "pg_lsn_tbl", column "f1", type pg_lsn
 INSERT INTO PG_LSN_TBL VALUES ('ABCD/');
 ERROR:  invalid input syntax for type pg_lsn: "ABCD/"
 LINE 1: INSERT INTO PG_LSN_TBL VALUES ('ABCD/');
                                        ^
+CONTEXT:  INSERT "pg_lsn_tbl", column "f1", type pg_lsn
 INSERT INTO PG_LSN_TBL VALUES ('/ABCD');
 ERROR:  invalid input syntax for type pg_lsn: "/ABCD"
 LINE 1: INSERT INTO PG_LSN_TBL VALUES ('/ABCD');
                                        ^
+CONTEXT:  INSERT "pg_lsn_tbl", column "f1", type pg_lsn
 DROP TABLE PG_LSN_TBL;
 -- Operators
 SELECT '0/16AE7F8' = '0/16AE7F8'::pg_lsn;
diff --git a/src/test/regress/expected/point.out b/src/test/regress/expected/point.out
index bfc0962..f726f12 100644
--- a/src/test/regress/expected/point.out
+++ b/src/test/regress/expected/point.out
@@ -12,15 +12,18 @@ INSERT INTO POINT_TBL(f1) VALUES ('asdfasdf');
 ERROR:  invalid input syntax for type point: "asdfasdf"
 LINE 1: INSERT INTO POINT_TBL(f1) VALUES ('asdfasdf');
                                           ^
+CONTEXT:  INSERT "point_tbl", column "f1", type point
 INSERT INTO POINT_TBL(f1) VALUES ('10.0,10.0');
 INSERT INTO POINT_TBL(f1) VALUES ('(10.0 10.0)');
 ERROR:  invalid input syntax for type point: "(10.0 10.0)"
 LINE 1: INSERT INTO POINT_TBL(f1) VALUES ('(10.0 10.0)');
                                           ^
+CONTEXT:  INSERT "point_tbl", column "f1", type point
 INSERT INTO POINT_TBL(f1) VALUES ('(10.0,10.0');
 ERROR:  invalid input syntax for type point: "(10.0,10.0"
 LINE 1: INSERT INTO POINT_TBL(f1) VALUES ('(10.0,10.0');
                                           ^
+CONTEXT:  INSERT "point_tbl", column "f1", type point
 SELECT '' AS six, * FROM POINT_TBL;
  six |     f1     
 -----+------------
diff --git a/src/test/regress/expected/polygon.out b/src/test/regress/expected/polygon.out
index 2361274..ffc3bcd 100644
--- a/src/test/regress/expected/polygon.out
+++ b/src/test/regress/expected/polygon.out
@@ -14,22 +14,27 @@ INSERT INTO POLYGON_TBL(f1) VALUES ('0.0');
 ERROR:  invalid input syntax for type polygon: "0.0"
 LINE 1: INSERT INTO POLYGON_TBL(f1) VALUES ('0.0');
                                             ^
+CONTEXT:  INSERT "polygon_tbl", column "f1", type polygon
 INSERT INTO POLYGON_TBL(f1) VALUES ('(0.0 0.0');
 ERROR:  invalid input syntax for type polygon: "(0.0 0.0"
 LINE 1: INSERT INTO POLYGON_TBL(f1) VALUES ('(0.0 0.0');
                                             ^
+CONTEXT:  INSERT "polygon_tbl", column "f1", type polygon
 INSERT INTO POLYGON_TBL(f1) VALUES ('(0,1,2)');
 ERROR:  invalid input syntax for type polygon: "(0,1,2)"
 LINE 1: INSERT INTO POLYGON_TBL(f1) VALUES ('(0,1,2)');
                                             ^
+CONTEXT:  INSERT "polygon_tbl", column "f1", type polygon
 INSERT INTO POLYGON_TBL(f1) VALUES ('(0,1,2,3');
 ERROR:  invalid input syntax for type polygon: "(0,1,2,3"
 LINE 1: INSERT INTO POLYGON_TBL(f1) VALUES ('(0,1,2,3');
                                             ^
+CONTEXT:  INSERT "polygon_tbl", column "f1", type polygon
 INSERT INTO POLYGON_TBL(f1) VALUES ('asdf');
 ERROR:  invalid input syntax for type polygon: "asdf"
 LINE 1: INSERT INTO POLYGON_TBL(f1) VALUES ('asdf');
                                             ^
+CONTEXT:  INSERT "polygon_tbl", column "f1", type polygon
 SELECT '' AS four, * FROM POLYGON_TBL;
  four |         f1          
 ------+---------------------
diff --git a/src/test/regress/expected/reltime.out b/src/test/regress/expected/reltime.out
index 14fdc6a..4c53841 100644
--- a/src/test/regress/expected/reltime.out
+++ b/src/test/regress/expected/reltime.out
@@ -13,10 +13,12 @@ INSERT INTO RELTIME_TBL (f1) VALUES ('badly formatted reltime');
 ERROR:  invalid input syntax for type reltime: "badly formatted reltime"
 LINE 1: INSERT INTO RELTIME_TBL (f1) VALUES ('badly formatted reltim...
                                              ^
+CONTEXT:  INSERT "reltime_tbl", column "f1", type reltime
 INSERT INTO RELTIME_TBL (f1) VALUES ('@ 30 eons ago');
 ERROR:  invalid input syntax for type reltime: "@ 30 eons ago"
 LINE 1: INSERT INTO RELTIME_TBL (f1) VALUES ('@ 30 eons ago');
                                              ^
+CONTEXT:  INSERT "reltime_tbl", column "f1", type reltime
 -- test reltime operators
 SELECT '' AS six, * FROM RELTIME_TBL;
  six |      f1       
diff --git a/src/test/regress/expected/rowtypes.out b/src/test/regress/expected/rowtypes.out
index 25b0828..e74ff33 100644
--- a/src/test/regress/expected/rowtypes.out
+++ b/src/test/regress/expected/rowtypes.out
@@ -416,6 +416,7 @@ ERROR:  column "f1" is of type integer but expression is of type compos
 LINE 2: insert into compos values (v);  -- fail
                                    ^
 HINT:  You will need to rewrite or cast the expression.
+CONTEXT:  INSERT "compos", column "f1", type integer
 create function fcompos1(v compos) returns void as $$
 insert into compos values (v.*);
 $$ language sql;
diff --git a/src/test/regress/expected/time.out b/src/test/regress/expected/time.out
index 8e0afe6..51c5c99 100644
--- a/src/test/regress/expected/time.out
+++ b/src/test/regress/expected/time.out
@@ -18,6 +18,7 @@ INSERT INTO TIME_TBL VALUES ('15:36:39 America/New_York');
 ERROR:  invalid input syntax for type time: "15:36:39 America/New_York"
 LINE 1: INSERT INTO TIME_TBL VALUES ('15:36:39 America/New_York');
                                      ^
+CONTEXT:  INSERT "time_tbl", column "f1", type time without time zone
 SELECT f1 AS "Time" FROM TIME_TBL;
     Time     
 -------------
diff --git a/src/test/regress/expected/timestamp.out b/src/test/regress/expected/timestamp.out
index 4a2fabd..fa3d8cf 100644
--- a/src/test/regress/expected/timestamp.out
+++ b/src/test/regress/expected/timestamp.out
@@ -84,14 +84,17 @@ INSERT INTO TIMESTAMP_TBL VALUES ('invalid');
 ERROR:  date/time value "invalid" is no longer supported
 LINE 1: INSERT INTO TIMESTAMP_TBL VALUES ('invalid');
                                           ^
+CONTEXT:  INSERT "timestamp_tbl", column "d1", type timestamp without time zone
 INSERT INTO TIMESTAMP_TBL VALUES ('undefined');
 ERROR:  date/time value "undefined" is no longer supported
 LINE 1: INSERT INTO TIMESTAMP_TBL VALUES ('undefined');
                                           ^
+CONTEXT:  INSERT "timestamp_tbl", column "d1", type timestamp without time zone
 INSERT INTO TIMESTAMP_TBL VALUES ('current');
 ERROR:  date/time value "current" is no longer supported
 LINE 1: INSERT INTO TIMESTAMP_TBL VALUES ('current');
                                           ^
+CONTEXT:  INSERT "timestamp_tbl", column "d1", type timestamp without time zone
 -- Postgres v6.0 standard output format
 INSERT INTO TIMESTAMP_TBL VALUES ('Mon Feb 10 17:32:01 1997 PST');
 -- Variations on Postgres v6.1 standard output format
@@ -135,6 +138,7 @@ INSERT INTO TIMESTAMP_TBL VALUES ('19970710 173201 America/Does_not_exist');
 ERROR:  time zone "america/does_not_exist" not recognized
 LINE 1: INSERT INTO TIMESTAMP_TBL VALUES ('19970710 173201 America/D...
                                           ^
+CONTEXT:  INSERT "timestamp_tbl", column "d1", type timestamp without time zone
 -- Check date conversion and date arithmetic
 INSERT INTO TIMESTAMP_TBL VALUES ('1997-06-10 18:32:01 PDT');
 INSERT INTO TIMESTAMP_TBL VALUES ('Feb 10 17:32:01 1997');
@@ -164,6 +168,7 @@ INSERT INTO TIMESTAMP_TBL VALUES ('Feb 29 17:32:01 1997');
 ERROR:  date/time field value out of range: "Feb 29 17:32:01 1997"
 LINE 1: INSERT INTO TIMESTAMP_TBL VALUES ('Feb 29 17:32:01 1997');
                                           ^
+CONTEXT:  INSERT "timestamp_tbl", column "d1", type timestamp without time zone
 INSERT INTO TIMESTAMP_TBL VALUES ('Mar 01 17:32:01 1997');
 INSERT INTO TIMESTAMP_TBL VALUES ('Dec 30 17:32:01 1997');
 INSERT INTO TIMESTAMP_TBL VALUES ('Dec 31 17:32:01 1997');
@@ -176,10 +181,12 @@ INSERT INTO TIMESTAMP_TBL VALUES ('Feb 16 17:32:01 -0097');
 ERROR:  time zone displacement out of range: "Feb 16 17:32:01 -0097"
 LINE 1: INSERT INTO TIMESTAMP_TBL VALUES ('Feb 16 17:32:01 -0097');
                                           ^
+CONTEXT:  INSERT "timestamp_tbl", column "d1", type timestamp without time zone
 INSERT INTO TIMESTAMP_TBL VALUES ('Feb 16 17:32:01 5097 BC');
 ERROR:  timestamp out of range: "Feb 16 17:32:01 5097 BC"
 LINE 1: INSERT INTO TIMESTAMP_TBL VALUES ('Feb 16 17:32:01 5097 BC')...
                                           ^
+CONTEXT:  INSERT "timestamp_tbl", column "d1", type timestamp without time zone
 SELECT '' AS "64", d1 FROM TIMESTAMP_TBL;
  64 |             d1              
 ----+-----------------------------
diff --git a/src/test/regress/expected/timestamptz.out b/src/test/regress/expected/timestamptz.out
index 9fa93a4..b51e614 100644
--- a/src/test/regress/expected/timestamptz.out
+++ b/src/test/regress/expected/timestamptz.out
@@ -83,14 +83,17 @@ INSERT INTO TIMESTAMPTZ_TBL VALUES ('invalid');
 ERROR:  date/time value "invalid" is no longer supported
 LINE 1: INSERT INTO TIMESTAMPTZ_TBL VALUES ('invalid');
                                             ^
+CONTEXT:  INSERT "timestamptz_tbl", column "d1", type timestamp with time zone
 INSERT INTO TIMESTAMPTZ_TBL VALUES ('undefined');
 ERROR:  date/time value "undefined" is no longer supported
 LINE 1: INSERT INTO TIMESTAMPTZ_TBL VALUES ('undefined');
                                             ^
+CONTEXT:  INSERT "timestamptz_tbl", column "d1", type timestamp with time zone
 INSERT INTO TIMESTAMPTZ_TBL VALUES ('current');
 ERROR:  date/time value "current" is no longer supported
 LINE 1: INSERT INTO TIMESTAMPTZ_TBL VALUES ('current');
                                             ^
+CONTEXT:  INSERT "timestamptz_tbl", column "d1", type timestamp with time zone
 -- Postgres v6.0 standard output format
 INSERT INTO TIMESTAMPTZ_TBL VALUES ('Mon Feb 10 17:32:01 1997 PST');
 -- Variations on Postgres v6.1 standard output format
@@ -147,6 +150,7 @@ INSERT INTO TIMESTAMPTZ_TBL VALUES ('19970710 173201 America/Does_not_exist');
 ERROR:  time zone "america/does_not_exist" not recognized
 LINE 1: INSERT INTO TIMESTAMPTZ_TBL VALUES ('19970710 173201 America...
                                             ^
+CONTEXT:  INSERT "timestamptz_tbl", column "d1", type timestamp with time zone
 SELECT '19970710 173201' AT TIME ZONE 'America/Does_not_exist';
 ERROR:  time zone "America/Does_not_exist" not recognized
 -- Daylight saving time for timestamps beyond 32-bit time_t range.
@@ -203,6 +207,7 @@ INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 29 17:32:01 1997');
 ERROR:  date/time field value out of range: "Feb 29 17:32:01 1997"
 LINE 1: INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 29 17:32:01 1997');
                                             ^
+CONTEXT:  INSERT "timestamptz_tbl", column "d1", type timestamp with time zone
 INSERT INTO TIMESTAMPTZ_TBL VALUES ('Mar 01 17:32:01 1997');
 INSERT INTO TIMESTAMPTZ_TBL VALUES ('Dec 30 17:32:01 1997');
 INSERT INTO TIMESTAMPTZ_TBL VALUES ('Dec 31 17:32:01 1997');
@@ -215,10 +220,12 @@ INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 16 17:32:01 -0097');
 ERROR:  time zone displacement out of range: "Feb 16 17:32:01 -0097"
 LINE 1: INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 16 17:32:01 -0097')...
                                             ^
+CONTEXT:  INSERT "timestamptz_tbl", column "d1", type timestamp with time zone
 INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 16 17:32:01 5097 BC');
 ERROR:  timestamp out of range: "Feb 16 17:32:01 5097 BC"
 LINE 1: INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 16 17:32:01 5097 BC...
                                             ^
+CONTEXT:  INSERT "timestamptz_tbl", column "d1", type timestamp with time zone
 -- Alternative field order that we've historically supported (sort of)
 -- with regular and POSIXy timezone specs
 SELECT 'Wed Jul 11 10:51:14 America/New_York 2001'::timestamptz;
diff --git a/src/test/regress/expected/timetz.out b/src/test/regress/expected/timetz.out
index 4391131..645fc3c 100644
--- a/src/test/regress/expected/timetz.out
+++ b/src/test/regress/expected/timetz.out
@@ -19,6 +19,7 @@ INSERT INTO TIMETZ_TBL VALUES ('15:36:39 America/New_York');
 ERROR:  invalid input syntax for type time with time zone: "15:36:39 America/New_York"
 LINE 1: INSERT INTO TIMETZ_TBL VALUES ('15:36:39 America/New_York');
                                        ^
+CONTEXT:  INSERT "timetz_tbl", column "f1", type time with time zone
 SELECT f1 AS "Time TZ" FROM TIMETZ_TBL;
     Time TZ     
 ----------------
diff --git a/src/test/regress/expected/tinterval.out b/src/test/regress/expected/tinterval.out
index a018972..dfd4903 100644
--- a/src/test/regress/expected/tinterval.out
+++ b/src/test/regress/expected/tinterval.out
@@ -20,11 +20,13 @@ INSERT INTO TINTERVAL_TBL (f1)
 ERROR:  invalid input syntax for type abstime: "bad time specifications"
 LINE 2:    VALUES ('["bad time specifications" ""]');
                    ^
+CONTEXT:  INSERT "tinterval_tbl", column "f1", type tinterval
 INSERT INTO TINTERVAL_TBL (f1)
    VALUES ('["" "infinity"]');
 ERROR:  invalid input syntax for type abstime: ""
 LINE 2:    VALUES ('["" "infinity"]');
                    ^
+CONTEXT:  INSERT "tinterval_tbl", column "f1", type tinterval
 -- test tinterval operators
 SELECT '' AS five, * FROM TINTERVAL_TBL;
  five |                               f1                                
diff --git a/src/test/regress/expected/uuid.out b/src/test/regress/expected/uuid.out
index 59cb1e0..e2b4341 100644
--- a/src/test/regress/expected/uuid.out
+++ b/src/test/regress/expected/uuid.out
@@ -16,29 +16,35 @@ INSERT INTO guid1(guid_field) VALUES('11111111-1111-1111-1111-111111111111F');
 ERROR:  invalid input syntax for uuid: "11111111-1111-1111-1111-111111111111F"
 LINE 1: INSERT INTO guid1(guid_field) VALUES('11111111-1111-1111-111...
                                              ^
+CONTEXT:  INSERT "guid1", column "guid_field", type uuid
 -- too short
 INSERT INTO guid1(guid_field) VALUES('{11111111-1111-1111-1111-11111111111}');
 ERROR:  invalid input syntax for uuid: "{11111111-1111-1111-1111-11111111111}"
 LINE 1: INSERT INTO guid1(guid_field) VALUES('{11111111-1111-1111-11...
                                              ^
+CONTEXT:  INSERT "guid1", column "guid_field", type uuid
 -- valid data but invalid format
 INSERT INTO guid1(guid_field) VALUES('111-11111-1111-1111-1111-111111111111');
 ERROR:  invalid input syntax for uuid: "111-11111-1111-1111-1111-111111111111"
 LINE 1: INSERT INTO guid1(guid_field) VALUES('111-11111-1111-1111-11...
                                              ^
+CONTEXT:  INSERT "guid1", column "guid_field", type uuid
 INSERT INTO guid1(guid_field) VALUES('{22222222-2222-2222-2222-222222222222 ');
 ERROR:  invalid input syntax for uuid: "{22222222-2222-2222-2222-222222222222 "
 LINE 1: INSERT INTO guid1(guid_field) VALUES('{22222222-2222-2222-22...
                                              ^
+CONTEXT:  INSERT "guid1", column "guid_field", type uuid
 -- invalid data
 INSERT INTO guid1(guid_field) VALUES('11111111-1111-1111-G111-111111111111');
 ERROR:  invalid input syntax for uuid: "11111111-1111-1111-G111-111111111111"
 LINE 1: INSERT INTO guid1(guid_field) VALUES('11111111-1111-1111-G11...
                                              ^
+CONTEXT:  INSERT "guid1", column "guid_field", type uuid
 INSERT INTO guid1(guid_field) VALUES('11+11111-1111-1111-1111-111111111111');
 ERROR:  invalid input syntax for uuid: "11+11111-1111-1111-1111-111111111111"
 LINE 1: INSERT INTO guid1(guid_field) VALUES('11+11111-1111-1111-111...
                                              ^
+CONTEXT:  INSERT "guid1", column "guid_field", type uuid
 --inserting three input formats
 INSERT INTO guid1(guid_field) VALUES('11111111-1111-1111-1111-111111111111');
 INSERT INTO guid1(guid_field) VALUES('{22222222-2222-2222-2222-222222222222}');
diff --git a/src/test/regress/expected/xml.out b/src/test/regress/expected/xml.out
index f21e119..7f89126 100644
--- a/src/test/regress/expected/xml.out
+++ b/src/test/regress/expected/xml.out
@@ -11,6 +11,7 @@ LINE 1: INSERT INTO xmltest VALUES (3, '<wrong');
 DETAIL:  line 1: Couldn't find end of Start Tag wrong line 1
 <wrong
       ^
+CONTEXT:  INSERT "xmltest", column "data", type xml
 SELECT * FROM xmltest;
  id |        data        
 ----+--------------------
diff --git a/src/test/regress/expected/xml_1.out b/src/test/regress/expected/xml_1.out
index d702703..ccc9bf9 100644
--- a/src/test/regress/expected/xml_1.out
+++ b/src/test/regress/expected/xml_1.out
@@ -8,18 +8,21 @@ LINE 1: INSERT INTO xmltest VALUES (1, '<value>one</value>');
                                        ^
 DETAIL:  This functionality requires the server to be built with libxml support.
 HINT:  You need to rebuild PostgreSQL using --with-libxml.
+CONTEXT:  INSERT "xmltest", column "data", type xml
 INSERT INTO xmltest VALUES (2, '<value>two</value>');
 ERROR:  unsupported XML feature
 LINE 1: INSERT INTO xmltest VALUES (2, '<value>two</value>');
                                        ^
 DETAIL:  This functionality requires the server to be built with libxml support.
 HINT:  You need to rebuild PostgreSQL using --with-libxml.
+CONTEXT:  INSERT "xmltest", column "data", type xml
 INSERT INTO xmltest VALUES (3, '<wrong');
 ERROR:  unsupported XML feature
 LINE 1: INSERT INTO xmltest VALUES (3, '<wrong');
                                        ^
 DETAIL:  This functionality requires the server to be built with libxml support.
 HINT:  You need to rebuild PostgreSQL using --with-libxml.
+CONTEXT:  INSERT "xmltest", column "data", type xml
 SELECT * FROM xmltest;
  id | data 
 ----+------
diff --git a/src/test/regress/expected/xml_2.out b/src/test/regress/expected/xml_2.out
index 530faf5..af587df 100644
--- a/src/test/regress/expected/xml_2.out
+++ b/src/test/regress/expected/xml_2.out
@@ -9,6 +9,7 @@ ERROR:  invalid XML content
 LINE 1: INSERT INTO xmltest VALUES (3, '<wrong');
                                        ^
 DETAIL:  line 1: Couldn't find end of Start Tag wrong line 1
+CONTEXT:  INSERT "xmltest", column "data", type xml
 SELECT * FROM xmltest;
  id |        data        
 ----+--------------------
