-
Notifications
You must be signed in to change notification settings - Fork 67
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
dbtoyaml fails when dealing with extension-owned triggers/functions #236
Comments
The suggested fix is as follows (to be applied to WHERE NOT tgisinternal
AND (nspname != 'pg_catalog' AND nspname != 'information_schema')
AND t.tgfoid NOT IN (
SELECT objid FROM pg_depend WHERE deptype = 'e'
AND classid = 'pg_proc'::regclass) |
Just tested this and confirmed that it resolved the pg_cron-related bug. |
OK, since (as you stated in the other issue) the "second error persists", there must still be some other query that needs to be fixed to deal properly with extension-related objects. A quick look at |
So, I tested that query against my DB and it does appear to be producing a row that corresponds to the function mentioned in the error stack:
I don't know if that means it IS working, or that IS the issue (seems to me that it would be the former). Is there another query that I should check to make sure it produces a corresponding result with the function def? |
I'm not sure what "that query" means, since although I quoted some lines, the full query is actually constructed and returned on line 534. Unless you've learned Python since we started, I wonder what your test query really was. Anyway, if I were to start debugging, I'd add a |
This is the query I ran:
The columns returned are inconsequential in this context and the only variable substitution I could find was one AND condition, which I easily found. Based on the look of the code, that would be the most restrictive case too. Not saying I've provided anything useful, just trying to help. |
@alexitheodore Change db74727, which I just submitted, takes care of cleaning up the output of |
Initially reported by @alexitheodore in issue #226 starting from 2-Nov-2021. A sample traceback is as follows:
The text was updated successfully, but these errors were encountered: