pgcentralfoundation/pgrx

๐Ÿž `PGRX_EMBED was not set`

Closed this issue ยท 1 comments

Following error occurs.

thread 'main' panicked at src/bin/pgrx_embed.rs:1:1:
PGRX_EMBED was not set.

Cannot find anything in documention to solve the issue.

What is needed to solve this error?

How to repeat:

cargo pgrx new pg_utils 
cargo run --package pg_utils --bin pgrx_embed_pg_utils
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.31s
     Running `target/debug/pgrx_embed_pg_utils`
thread 'main' panicked at src/bin/pgrx_embed.rs:1:1:
PGRX_EMBED was not set.
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

You want to be using โ€œcargo pgrx runโ€ to run a pgrx Postgres extension. pgrx extensions are shared libraries not executables.

If you check the cargo-pgrx/README.md file in this repo youโ€™ll find all the things it can do and how to use them.