Skip to content

Commit

Permalink
normalize partition tables to lowercase
Browse files Browse the repository at this point in the history
  • Loading branch information
timgit committed Aug 2, 2024
1 parent de00c1a commit 0c41019
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/plans.js
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ function getPartitionFunction (schema) {
return `
CREATE FUNCTION ${schema}.get_partition(queue_name text, out name text) AS
$$
SELECT 'j' || left(regexp_replace(queue_name, '\\W', '', 'g'),10) || left(encode(sha224(queue_name::bytea), 'hex'),10);
SELECT 'j' || lower(left(regexp_replace(queue_name, '\\W', '', 'g'),10)) || left(encode(sha224(queue_name::bytea), 'hex'),10);
$$
LANGUAGE SQL
IMMUTABLE
Expand Down
4 changes: 2 additions & 2 deletions test/publishTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ describe('pubsub', function () {
it('should use subscriptions to map to more than one queue', async function () {
const boss = this.test.boss = await helper.start({ ...this.test.bossConfig, noDefault: true })

const queue1 = 'queue1'
const queue2 = 'queue2'
const queue1 = 'subqueue1'
const queue2 = 'subqueue2'

await boss.createQueue(queue1)
await boss.createQueue(queue2)
Expand Down

0 comments on commit 0c41019

Please sign in to comment.