Implement check_function_bodies only for Postgres#135
Conversation
|
Here's a different implementation of #134 . Specs don't pass (not sure why yet), but this is simpler and only for PG. |
|
Is this implementation more aligned with what you had in mind? |
|
Any chance this could be merged in? Thanks! |
|
I'm unsure I want to support this, because I have no context of the use-case or how it is supported in other databases (and therefore the other adapters). |
|
From the previous PR:
As mentioned, this is the default behavior of pg_dump and essential to load a schema that includes functions. Without this, creating a functions that depend on tables that are yet to be created fails (ie: will be created in a subsequent query from the schema). |
|
Thanks @cmer - I need to do some reading on this and testing. Can't promise when or if that happens, but I will try. |
|
Thanks! This would be game-changer TBH. Hope you see the value in it. |
| # https://www.postgresql.org/docs/9.5/runtime-config-client.html#GUC-CHECK-FUNCTION-BODIES | ||
| # | ||
| # Set to `nil` to use the database default configuration. | ||
| # The default and recommended value is `false` to mimic pg_dump's behavior. |
There was a problem hiding this comment.
I am not sure about this. The docs say:
This parameter is normally on.
So maybe the default should be true here, with the possibility to set it to false for specific use cases?
There was a problem hiding this comment.
You could do that. It's off by default for pg_dump from what I remember, and this gem is the closest thing to pg_dump so it seemed reasonable to follow the pg_dump conventions. Either way works. Just having the option would be a huge win!
There was a problem hiding this comment.
See: https://dba.stackexchange.com/questions/284260/how-to-prevent-pg-dump-from-generating-set-default-table-access-method-heap -- it shows that false the default value for pg_dump.
|
Still hoping for this to get merged in! 🙏 |
|
Keeping this open as I'd like to support this, if it proves of value! I have just released a new version after lagging behind a lot, with some small refactorings and versioning updates (ruby x rails). What I'd like to tackle next is #180, because it dawned on me that I'm supporting EOL postgres versions and that feels...redundant. Once that is done, I'll come back to this. I need to review some more what this functional use-case is, benefits, drawbacks. But expect that after the holiday break. |
|
I'm still here for it. |
No description provided.