(2)
I'll use this C code as an example to build an extention in Rust. The
Postgresql bindings for Rust I have don't contain a definition of
`FirstLowInvalidHeapAttributeNumber` for some reason. I can define it
since it's simply single digit constant.
Not an answer to your question - but use better bindings! https://github.com/zombodb/pgx
[nix-shell:~/rust/pgx_master]$ grep -R FirstLowInvalidHeapAttributeNumber pgx-pg-sys/
pgx-pg-sys/generated-bindings/pg12_specific.rs:pub const FirstLowInvalidHeapAttributeNumber: i32 = -7;
pgx-pg-sys/generated-bindings/pg12_specific.rs:pub const FirstLowInvalidHeapAttributeNumber: i32 = -7;
Which is obviously not quite right still, so I pushed a version with some extra includes. Now you will get:
[nix-shell:~/rust/pgx_master]$ grep -R FirstLowInvalidHeapAttributeNumber ./pgx-pg-sys/
./pgx-pg-sys/generated-bindings/pg10_specific.rs:pub const FirstLowInvalidHeapAttributeNumber: i32 = -8;
./pgx-pg-sys/generated-bindings/pg12_specific.rs:pub const FirstLowInvalidHeapAttributeNumber: i32 = -7;
./pgx-pg-sys/generated-bindings/pg11_specific.rs:pub const FirstLowInvalidHeapAttributeNumber: i32 = -8;
./pgx-pg-sys/generated-bindings/pg10_specific.rs:pub const FirstLowInvalidHeapAttributeNumber: i32 = -8;
./pgx-pg-sys/generated-bindings/pg12_specific.rs:pub const FirstLowInvalidHeapAttributeNumber: i32 = -7;
./pgx-pg-sys/generated-bindings/pg11_specific.rs:pub const FirstLowInvalidHeapAttributeNumber: i32 = -8;
You'll need to use the Github version not the crates.io until the next release if you want all the versions.