add --stored-proc-type to choose PL/pgSQL vs C when building DB#30
add --stored-proc-type to choose PL/pgSQL vs C when building DB#30sahitya-chandra wants to merge 2 commits into
Conversation
|
I like this idea. Might take me a little bit more time to look through it. |
|
I'm wondering if the compose environment I just added (38d6bbf) will be a nice way to play with this. I still need a little more time to try this more in depth. As I think more about the build script pass through, I'm not sure about the use case for that. I feel that on an initial build, you always want everything. Otherwise you don't have a complete build, in other words the workload won't function if there is a stored function missing. So the more I think out load, the more I'm starting to question if it's worth the extra code. It's pretty fast and a bit simpler to just reload everything all at once with the way the things work now. While the finer control sounds nice, I'm wondering if it'll still be easier to not use it... |
da10fdf to
2b66dcf
Compare
@markwkm sir, thanks for the detailed feedback and for updating #22 Corrected approach for #22 (PL/pgSQL vs C)
I will revert the “subset of ten procedures” behavior from the PR and implement this instead. I am happy to discuss more on this |
What will be more helpful for discussion is if you put the description of the changes into the commit too. It looks like you left the ability to select individual functions. Let's keep it simpler. |
markwkm
left a comment
There was a problem hiding this comment.
Because I didn't write it here... #30 (comment)
Sure sir, I will follow exactly this in my next commit, with proper implementation. thanks |
…ures to use Fixes osdldbt#22 — lets the user choose whether PL/pgSQL or C stored functions are loaded when building the database, instead of always defaulting to PL/pgSQL with no way to change it from the build path. Changes: - dbt5-pgsql-build-db: add --stored-proc-type=TYPE (plpgsql|c, default plpgsql) and pass it as -t TYPE to dbt5-pgsql-load-stored-procs. - dbt5-build: add --stored-proc-type=TYPE and forward it to dbt5-pgsql-build-db via BUILDARGS. - doc/postgresql.rst: document --stored-proc-type usage and the C prerequisite. - man/man1/dbt5-build.1.rst.in: document --stored-proc-type option. The existing dbt5-pgsql-load-stored-procs already supports -t plpgsql|c; this change simply threads the user's choice from the top-level build commands into that script. Using -t c requires the C stored functions to be compiled and installed on the database server first (make && make install in storedproc/pgsql/c).
|
@markwkm sir, I have pushed the changes with a proper commit message and also updated the pr title and description. Let me know if you'd like any changes! |
markwkm
left a comment
There was a problem hiding this comment.
I think this looks ok. I still need to try it.
One thing to note is that I don't use GitHub to managing the repo, so I'll probably remove references to issues and pull requests.
|
No issues, sir. Is there anything you want me to test on my side? |
Summary
Implements #22: the database build path can choose whether stored functions are loaded as PL/pgSQL (default) or C, matching the clarified issue scope (implementation choice, not which individual procedures to install).
Earlier work on the same PR targeted “subset of the ten procedures”; that has been removed in favor of this simpler pass-through to the existing
dbt5-pgsql-load-stored-procs -tbehavior.What changed
dbt5-pgsql-build-db: New--stored-proc-type=TYPEwithTYPE=plpgsqlorc(defaultplpgsql). Passed todbt5-pgsql-load-stored-procsas-t TYPE.dbt5 build: New--stored-proc-type=TYPE, forwarded todbt5-pgsql-build-db.doc/postgresql.rst: Documents--stored-proc-typeand thatcrequires C extensions built/installed on the server first.man/man1/dbt5-build.1.rst.in: Documents--stored-proc-type.No changes to
dbt5-pgsql-load-stored-procslogic; it already supports-t plpgsql|c.Example
Using
cstill requires a priormake/make installinstoredproc/pgsql/con the PostgreSQL server (same as loading manually with-t c).Backward compatibility
Default remains PL/pgSQL; callers who omit the new flag behave as before.