Skip to content

Commit

Permalink
use Identifier format instead of string format (#296)
Browse files Browse the repository at this point in the history
* use Identifier format instead of string format

* fix formatter

* inserts

* handle upgrade sql

* Update pgmq-extension/sql/pgmq.sql

Co-authored-by: David E. Wheeler <46604+theory@users.noreply.github.com>

* get pgrx pg_config from info

* PERFORM over formatting

* partition col

* fix typo

* update test and use helper format fn

* simplify fn

* create or replace

* add test case

* remove built sql

---------

Co-authored-by: David E. Wheeler <46604+theory@users.noreply.github.com>
  • Loading branch information
ChuckHend and theory committed Aug 15, 2024
1 parent 686cab4 commit 04a06b6
Show file tree
Hide file tree
Showing 6 changed files with 929 additions and 104 deletions.
11 changes: 4 additions & 7 deletions .github/workflows/extension_upgrade.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,16 @@ jobs:
- uses: ./.github/actions/pgx-init
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y postgresql-server-dev-14
- name: Set PG_CONFIG environment variable
run: echo "PG_CONFIG=$(cargo pgrx info pg-config pg16)" >> $GITHUB_ENV
- name: Install pg_partman
run: |
git clone https://github.com/pgpartman/pg_partman.git && \
cd pg_partman && \
git checkout v4.7.4 && \
sed -i 's|PG_CONFIG = pg_config|PG_CONFIG = ~/.pgrx/16.3/pgrx-install/bin/pg_config|' Makefile && \
sed -i "s|PG_CONFIG = pg_config|PG_CONFIG = ${PG_CONFIG}|" Makefile && \
make && \
make install && \
ls -alh /home/runner/.pgrx/16.3/pgrx-install/share/postgresql/extension/pg_partman*
make install
- name: Checkout old version (1.0.0)
run: |
git fetch --tags
Expand All @@ -71,20 +72,16 @@ jobs:
psql $DATABASE_URL -c "CREATE EXTENSION pgmq;"
psql $DATABASE_URL -c "select * from pgmq.create('test_queue_1')"
psql $DATABASE_URL -c "select * from pgmq.create_partitioned('test_partitioned_queue_1');"
ls -alh /home/runner/.pgrx/16.3/pgrx-install/share/postgresql/extension/pg_partman*
- name: Checkout branch's version
env:
CI_BRANCH: ${{ steps.current-version.outputs.CI_BRANCH }}
run: |
git checkout $CI_BRANCH
- name: Upgrade extension version
env:
PG_CONFIG: ~/.pgrx/16.3/pgrx-install/bin/pg_config
run: |
make clean
make
make install
ls -alh /home/runner/.pgrx/16.3/pgrx-install/share/postgresql/extension/pgmq*
psql postgres://$USER:postgres@localhost:28816/pgmq -c "ALTER EXTENSION pgmq UPDATE;"
- name: Run tests
env:
Expand Down
2 changes: 1 addition & 1 deletion pgmq-extension/pgmq.control
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
comment = 'A lightweight message queue. Like AWS SQS and RSMQ but on Postgres.'
default_version = '1.4.0'
default_version = '1.4.1'
module_pathname = '$libdir/pgmq'
schema = 'pgmq'
relocatable = false
Expand Down
Loading

0 comments on commit 04a06b6

Please sign in to comment.