bluejekyll/pg-extend-rs

Build errors

Closed this issue · 3 comments

I'm getting build errors since the FDW merge (was fine before) - is this supposed to compile on stable rust as-is?

rustc 1.31.1
macOS 10.14.2
Postgres 11.1

error[E0308]: mismatched types
   --> pg-extend/src/pg_fdw.rs:172:44
    |
172 |                 std::slice::from_raw_parts(tupledesc.attrs, tupledesc.natts as usize);
    |                                            ^^^^^^^^^^^^^^^ expected *-ptr, found struct `pg_sys::__IncompleteArrayField`
    |
    = note: expected type `*const *mut pg_sys::FormData_pg_attribute`
               found type `pg_sys::__IncompleteArrayField<pg_sys::FormData_pg_attribute>`

error[E0063]: missing fields `BeginForeignInsert`, `EndForeignInsert`, `ReparameterizeForeignPathByChild` in initializer of `pg_sys::FdwRoutine`
   --> pg-extend/src/pg_fdw.rs:222:29
    |
222 |         let node = Box::new(pg_sys::FdwRoutine {
    |                             ^^^^^^^^^^^^^^^^^^ missing `BeginForeignInsert`, `EndForeignInsert`, `ReparameterizeForeignPathByChild`

error: aborting due to 2 previous errors

Some errors occurred: E0063, E0308.
For more information about an error, try `rustc --explain E0063`.
error: Could not compile `pg-extend`.

To learn more, run the command again with --verbose.

Is this a Postgres 11 issue? All the Travis builds are against 10.

We might need a feature for 11?

And yes, everything has been working on stable Rust.

Ahhh - possibly. I've got a PR to add Datum <-> String conversions from playing around a while ago but when I applied it against the current HEAD the build is failing.

I'll take a look at putting in some checks against pg_sys::PG_VERSION_NUM and see if I can make this play nicely on at least Postgres >9.x

Ref #17