]> granicus.if.org Git - postgresql/commit
Improve error message for rejecting RETURNING clauses with dropped columns.
authorTom Lane <tgl@sss.pgh.pa.us>
Tue, 1 Mar 2016 00:11:38 +0000 (19:11 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 1 Mar 2016 00:12:03 +0000 (19:12 -0500)
commitf32b8bc9e0e0e3096bcdae15f9946b39851e10f9
treec2f25ecbf7e0ff199f637090171e9e37211c7542
parent0a3070baf3c48def1f7c46f57a6313adc26be4fa
Improve error message for rejecting RETURNING clauses with dropped columns.

This error message was written with only ON SELECT rules in mind, but since
then we also made RETURNING-clause targetlists go through the same logic.
This means that you got a rather off-topic error message if you tried to
add a rule with RETURNING to a table having dropped columns.  Ideally we'd
just support that, but some preliminary investigation says that it might be
a significant amount of work.  Seeing that Nicklas Avén's complaint is the
first one we've gotten about this in the ten years or so that the code's
been like that, I'm unwilling to put much time into it.  Instead, improve
the error report by issuing a different message for RETURNING cases, and
revise the associated comment based on this investigation.

Discussion: 1456176604.17219.9.camel@jordogskog.no
src/backend/rewrite/rewriteDefine.c