Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,29 @@ version = "0.1.0"
edition = "2021"

[lib]
crate-type = ["cdylib"]
crate-type = ["cdylib", "lib"]

[[bin]]
name = "pgrx_embed_pg_sqids"
path = "./src/bin/pgrx_embed.rs"

[features]
default = ["pg13"]
pg13 = ["pgrx/pg13", "pgrx-tests/pg13" ]
pg14 = ["pgrx/pg14", "pgrx-tests/pg14" ]
pg15 = ["pgrx/pg15", "pgrx-tests/pg15" ]
pg16 = ["pgrx/pg16", "pgrx-tests/pg16" ]
pg17 = ["pgrx/pg17", "pgrx-tests/pg17" ]
pg18 = ["pgrx/pg18", "pgrx-tests/pg18" ]
pg_test = []

[dependencies]
pgrx = "0.13.1"
pgrx = "=0.17.0"
sqids = "0.4.2"
thiserror = "2.0.12"

[dev-dependencies]
pgrx-tests = "0.13.1"
pgrx-tests = "=0.17.0"

[profile.dev]
panic = "unwind"
Expand All @@ -30,6 +36,3 @@ panic = "unwind"
opt-level = 3
lto = "fat"
codegen-units = 1

[package.metadata.pgrx]
version = "0.1.0"
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Not good for:
1. Install [pgrx](https://github.com/pgcentralfoundation/pgrx?tab=readme-ov-file#getting-started):

```bash
cargo install --locked cargo-pgrx
cargo install --locked --version=0.17.0 cargo-pgrx
```

1. Install dependencies and run psql session:
Expand Down
3 changes: 3 additions & 0 deletions pg_regress/expected/setup.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
-- this setup file is run immediately after the regression database is (re)created
-- the file is optional but you likely want to create the extension
CREATE EXTENSION pg_sqids;
3 changes: 3 additions & 0 deletions pg_regress/sql/setup.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
-- this setup file is run immediately after the regression database is (re)created
-- the file is optional but you likely want to create the extension
CREATE EXTENSION pg_sqids;
3 changes: 2 additions & 1 deletion pg_sqids.control
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
comment = 'pg_sqids: Created by pgrx'
default_version = '@CARGO_VERSION@'
module_pathname = '$libdir/pg_sqids'
module_pathname = 'pg_sqids'
relocatable = false
superuser = true
trusted = true
1 change: 1 addition & 0 deletions src/bin/pgrx_embed.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
::pgrx::pgrx_embed!();
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use error::PgError;
mod error;
mod utils;

pgrx::pg_module_magic!();
::pgrx::pg_module_magic!();

#[pg_extern(name = "sqids_encode")]
fn sqids_encode(numbers: VariadicArray<i64>) -> Result<String, PgError> {
Expand Down