Eric Ridge
Eric Ridge
That error message is unfortunate. :( Couple of questions: - What's the contents of `~/.pgx/config.toml`? - Are we sure `/usr/pgsql-14/bin/pg_config` exists on your machine? - What happens if you just...
Looking at the code, I think maybe you're missing `initdb` in `/usr/pgsql-14/bin/` Could that be the case? The code is: ```rust pub(crate) fn initdb(bindir: &PathBuf, datadir: &PathBuf) -> Result {...
Glad you got it sorted. I’ll definitely clean up the error message. Definitely unfortunate the way it is now.
We have a `cshim` (https://github.com/tcdi/pgx/tree/master/pgx-pg-sys/cshim) whose goal is to wrap Postgres `#defines` (and other static-inline functions) into plain old functions. And then we have manual `extern "C"` declarations for those...
Yeah we do but there’s not a lot of help from pgx. You’ll have to write all the various functions yourself too. There’s a little test that outlines the basics....
https://github.com/zombodb/pgx/tree/master/pgx-pg-sys/cshim Some have been wrapped as C functions. Others I’ve hand-ported to Rust. In general tho, we don’t have a good solution here. I’ve often wondered how hard it would...
do you also get a segfault without `--release`? That might make the stack trace a lot better...
My initial thought, based on the example from your repo was to instead use `macro_rules!`, like so: ```rust #[allow(non_snake_case)] macro_rules! IndexedLetter { () => { (name!(index, i32), name!(letter, &'static str))...
`#[pg_extern]` doesn't change the signature of the function to which it's attached. It makes a new `extern "C"` function that is exported by the .so, which calls the original function,...
> My bad, I was almost certain that a pub got removed at some point because my functions didn't appear in my Rustdoc but it must have been my fault....