postgres-extension.rs
postgres-extension.rs copied to clipboard
Postgres extensions written in Rust
Hi, I see that this has gone a while without update, and I put some work into getting this modernized on stable rust, and uploaded to crates.io. If you are...
Trying to build using rustc 1.16.0-nightly (47c8d9fdc 2017-01-08), but it fails: error[E0432]: unresolved import `syntax::parse::token::intern` --> /Users/joel/src/postgres-extension.rs/macros/src/lib.rs:11:5 | 11 | use syntax::parse::token::intern; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `intern` in `parse::token` error[E0432]: unresolved...
Datum
Need to figure out a good story here. A datum is simply a pointer stored as a `uint`. Then casted to an appropriate type (in C). Text, for example, is...
few corrections to make it work with rust 1.17-nightly
…ol instead of old syntax::parse::token::intern.
Since version 9.2, PostgreSQL has support for native [JSON datatypes](https://www.postgresql.org/docs/current/static/datatype-json.html): `json` and `jsonb` (`jsonb` is a binary representation with more efficient access). It would be pretty great to be able...
A few ideas I've had: - Remove the need to export `extern` functions using an attribute. - Super easy to work with data types like `PgText`, `int16`, etc... that can...
This is used for postgres-compatible functions. The macro is simply: ``` c // src/include/fmgr.h #define PG_FUNCTION_ARGS FunctionCallInfo fcinfo ``` And you'd use it as: ``` c Datum hello( PG_FUNCTION_ARGS );...