Re: determine what column(s) form the primary key, in C extention

Поиск
Список
Период
Сортировка
От James Sewell
Тема Re: determine what column(s) form the primary key, in C extention
Дата
Msg-id CAJe2zgMxLPPQM1BFDo27Wz9W3cq6zTZSFB31Kqg+DoPrKH2wMQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: determine what column(s) form the primary key, in C extention  (alex maslakov <alex@serendipia.email>)
Список pgsql-general
(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;


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;


You'll need to use the Github version not the crates.io until the next release if you want all the versions.




В списке pgsql-general по дате отправления:

Предыдущее
От: Ron
Дата:
Сообщение: Re: Postgres DB hacked.
Следующее
От: Laurenz Albe
Дата:
Сообщение: Re: When are largobject records TOASTed into pg_toast_2613?