Skip to content

Commit

Permalink
Merge branch 'main' into separate_indexes_primary_keys
Browse files Browse the repository at this point in the history
  • Loading branch information
ChuckHend authored Aug 22, 2023
2 parents 9fdd157 + 1532d1e commit 95f007d
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 23 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,8 @@ jobs:
# if that file is present
# and if the branch is 'main' or starts with 'release/'
tag_cargo_version_if_present: ${{ steps.tags.outputs.tag_cargo }}
# Tag with 'latest'
# if the branch is 'main'
publish_latest: ${{ steps.tags.outputs.tag_latest }}
# never publish latest - that is handled in other workflow
publish_latest: false
# If we are publishing latest, also tag it with calver
publish_calver: ${{ steps.tags_outputs.tag_latest }}
quay_user: ${{ secrets.QUAY_USER_TEMBO }}
Expand Down
2 changes: 1 addition & 1 deletion 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.14.2"
version = "0.14.3"
edition = "2021"
authors = ["Tembo.io"]
description = "Postgres extension for PGMQ"
Expand Down
2 changes: 1 addition & 1 deletion core/src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ pub enum PgmqError {

/// a queue name error
/// queue names must be alphanumeric and start with a letter
#[error("naming error: {name}")]
#[error("invalid queue name: '{name}'")]
InvalidQueueName { name: String },
}
2 changes: 1 addition & 1 deletion src/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ use pgrx::prelude::*;
use pgrx::spi;
use pgrx::spi::SpiTupleTable;

use crate::errors::PgmqExtError;
use crate::partition::PARTMAN_SCHEMA;
use crate::PgmqExtError;
use pgmq_crate::query::{destroy_queue, PGMQ_SCHEMA, TABLE_PREFIX};

#[pg_extern]
Expand Down
17 changes: 17 additions & 0 deletions src/errors.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
use pgmq_crate::errors::PgmqError;
use thiserror::Error;

#[derive(Error, Debug)]
pub enum PgmqExtError {
#[error("unexpected error")]
SqlError(#[from] pgrx::spi::Error),

#[error("{0}")]
Core(#[from] PgmqError),

#[error("{0} invalid types")]
TypeErrorError(String),

#[error("missing dependency: {0}")]
MissingDependency(String),
}
19 changes: 3 additions & 16 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,18 @@ use pgrx::warning;
pgrx::pg_module_magic!();

pub mod api;
pub mod errors;
pub mod metrics;
pub mod partition;

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

use std::time::Duration;

#[derive(Error, Debug)]
pub enum PgmqExtError {
#[error("")]
SqlError(#[from] pgrx::spi::Error),

#[error("")]
QueueError(#[from] PgmqError),
use errors::PgmqExtError;

#[error("{0} invalid types")]
TypeErrorError(String),

#[error("missing dependency: {0}")]
MissingDependency(String),
}
use std::time::Duration;

#[pg_extern]
fn pgmq_create_non_partitioned(queue_name: &str) -> Result<(), PgmqExtError> {
Expand Down

0 comments on commit 95f007d

Please sign in to comment.