Skip to content

Commit

Permalink
fully qualify insert path (#21)
Browse files Browse the repository at this point in the history
* fully qualiy insert path

* fmt
  • Loading branch information
ChuckHend authored Aug 6, 2023
1 parent 562fd94 commit 440b504
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
6 changes: 3 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "pgmq"
version = "0.10.1"
version = "0.10.2"
edition = "2021"
authors = ["Tembo.io"]
description = "Postgres extension for PGMQ"
Expand Down
6 changes: 4 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ pub mod metrics;
pub mod partition;

use pgmq_crate::errors::PgmqError;
use pgmq_crate::query::{archive, check_input, delete, init_queue, pop, read, TABLE_PREFIX};
use pgmq_crate::query::{
archive, check_input, delete, init_queue, pop, read, PGMQ_SCHEMA, TABLE_PREFIX,
};
use thiserror::Error;

#[derive(Error, Debug)]
Expand Down Expand Up @@ -82,7 +84,7 @@ fn enqueue_str(name: &str) -> Result<String, PgmqError> {
check_input(name)?;
Ok(format!(
"
INSERT INTO {TABLE_PREFIX}_{name} (vt, message)
INSERT INTO {PGMQ_SCHEMA}.{TABLE_PREFIX}_{name} (vt, message)
VALUES (now() at time zone 'utc', $1)
RETURNING msg_id;
"
Expand Down

0 comments on commit 440b504

Please sign in to comment.