Re:We built our customer data warehouse all on Postgres
by nextaccountic on Friday February 02, 2024 @03:58AM
(#39226628)
Is it on github?
[ Parent
| on HN ]
Re:We built our customer data warehouse all on Postgres
by codesnik on Friday February 02, 2024 @08:06AM
(#39228098)
no. it was a private project, and my solution wasn't general enough.
for functions/views/etc: I've used https://github.com/omniti-labs/pg_extractor then removed roles from dump (because the fluctuated between developers) and executed
perl -000 -i -lne 'print if ! /^--/ && ! /^SET /' `find schema/ -name '*.sql'` || exit 1
to remove a lot of useless comments and flags from the dump (pg_dump output isn't too readable). This oneliner can strip too much, though, comments in functions shouldn't start from the 0 column.The same script had been run on CI too, to verify that developer didn't forget to run it in the PR.