-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement check_function_bodies only for Postgres #135
base: master
Are you sure you want to change the base?
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
.
No description provided.