On Sat, Oct 1, 2016 at 5:08 AM, Thomas Munro <thomas.mu...@enterprisedb.com> wrote: > I guess you need something involving query_tree_walker or some other > kind of recursive traversal if you want to find DELETE/UPDATE lurking > in there. > > One option would be to document it as working for top level DELETE or > UPDATE, and leave the recursive version as an improvement for a later > patch. That's the most interesting kind to catch because that's what > people are most likely to type directly into a command line.
That would be a halfy-baked feature then, and the patch would finish by being refactored anyway if we support more cases in the future, because those will need a tree walker (think CTAS, INSERT SELECT, using WITH queries that contain DMLs)... Personally I think that it would be surprising if subqueries are not restrained. So I am -1 for the patch as-is, and let's come up with the most generic approach. Having more regression tests would be a good idea as well. I am marking the patch as returned with feedback. This CF has normally already ended. -- Michael -- Sent via pgsql-hackers mailing list (firstname.lastname@example.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers