Avoid comment calls in pg:dump by jaynetics · Pull Request #43216 · rails/rails...
source link: https://github.com/rails/rails/pull/43216
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Summary
This causes lines like COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';
to no longer appear in the db:structure:dump
when using PostgreSQL.
Such comment calls don't seem to add a lot of value.
They are bad, however, because with them, db:structure:load
only works for db superusers, as described in #36816, which is hard to debug due to the generic error ActiveRecord::StatementInvalid: PG::InsufficientPrivilege: ERROR: must be owner of extension
.
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK