Shulgin, Oleksandr wrote: > Another quirk of ALTER TABLE is that due to multi-pass processing in > ATRewriteCatalogs, the same command might be collected a number of times. > For example, in src/test/regress/sql/inherit.sql: > > alter table a alter column aa type integer using bit_length(aa); > > the "alter column type" then appears 4 times in the deparsed output as > identical subcommands of a single ALTER TABLE command.
Yeah, I had a hack somewhere in the collection code that if the relation ID was different from what was specified, then the command was ignored. I removed that before commit because it seemed possible that for some cases you actually want the command reported separately for each child. I think our best option in this case is to ignore commands that are reported for different relations during JSON deparsing. Not sure how easy that is. -- Álvaro Herrera http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers