tcdi / plrust

A Rust procedural language handler for PostgreSQL
PostgreSQL License
1.12k stars 32 forks source link

Add a function to list all the allowlisted crates with their respective versions, features #371

Closed anth0nyleung closed 1 year ago

anth0nyleung commented 1 year ago

Since we have introduced the mechanism to support allow-listing certain crates, it'd be useful to have a function that lists what are the allow-listed crates with their respective versions, and features etc.

One idea is to make a function returning a table like,

postgres=# select plrust.allowed_dependencies();
 allowed_dependencies 
----------------------
 (serde,1.0,{derive})
(1 row)

postgres=# 
$ > cat ~/allow.toml 
serde = { version = "=1.0", feature = ["derive"] }
eeeebbbbrrrr commented 1 year ago

This is a fine idea. Are you planning on submitting a PR or would you prefer we do it?

anth0nyleung commented 1 year ago

I would be happy to work on it!