Enable PGMQ to run without installing an extension #379
+104
−80
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request enables the installation of PGMQ using a simple
psql
command:It does NOT affect the existing functionality, nor does it impact PGMQ's ability to be installed as an extension.
This addresses the following issues directly and inderectly:
To achieve this the following was changed:
pgmq
schema gets created if it doesn't already existsend
andsend_batch
are moved higher up the SQL file so they can be found when referenced by the convenience functions with less arguments_extension_exists
function is introduced to check the existance of arbitrary extensions_ensure_pg_partman_installed
has been retrofitted to use the new_extension_exists
function.pgmq
extension have been guarded with_extension_exists('pgmq')