https://github.com/rustprooflabs/convert
Postgres extension for common conversions when working with spatial data.
https://github.com/rustprooflabs/convert
Last synced: 4 months ago
JSON representation
Postgres extension for common conversions when working with spatial data.
- Host: GitHub
- URL: https://github.com/rustprooflabs/convert
- Owner: rustprooflabs
- License: mit
- Created: 2022-11-14T01:38:12.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2025-05-25T14:05:38.000Z (about 1 year ago)
- Last Synced: 2025-10-07T22:40:02.606Z (8 months ago)
- Language: Rust
- Size: 30.3 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Convert: Common conversion functions
Convert is a Postgres extension providing common conversion functions, such as meters to feet
or miles to kilometers.
The `convert` extension is built using the Rust [pgrx framework](https://github.com/tcdi/pgrx).
## Creating installer for your system
Currently no pre-packaged installers are available. The following steps walk through
creating a package on a typical Ubuntu based system with Postgres 14.
These steps assume cargo pgrx is already installed.
The `fpm` step requires the `fpm` Ruby gem.
```bash
sudo apt install ruby-rubygems
sudo gem i fpm
```
> Timing note: `cargo pgrx package` takes ~ 2 minutes on my main dev machine.
```bash
cargo pgrx package --pg-config /usr/lib/postgresql/15/bin/pg_config
cd target/release/convert-pg15/
find ./ -name "*.so" -exec strip {} \;
OUTFILE=convert.deb
rm ${OUTFILE} || true
fpm \
-s dir \
-t deb -n convert \
-v 0.0.4 \
--deb-no-default-config-files \
-p ${OUTFILE} \
-a amd64 \
.
sudo dpkg -i --force-overwrite ./convert.deb
```