使用 Rust 开发 PostgreSQL 扩展函数 pgxr

码农软件 · 软件分类 · 其他开发相关 · 2019-10-16 08:56:34

软件介绍

pgxr —— 使用 Rust 开发 PostgreSQL 扩展函数(存储过程)

pgxr 是一个 Rust 的 crate 库,可以实现用 Rust 语言来编写 PostgreSQL 的扩展函数(相当于存储过程)。

代码示例:

#[macro_use]
extern crate pgxr;

use pgxr::bindings::*;

PG_MODULE_MAGIC!();

PG_FUNCTION_INFO_V1!(pg_finfo_pgxr_example_one);

#[no_mangle]
pub extern "C" fn pgxr_example_one(_fcinfo: FunctionCallInfo) -> Datum
{
    1
}

使用方法:

CREATE FUNCTION pgxr_example_one(integer) RETURNS integer
     AS 'libpgxr_example_one.so', 'pgxr_example_one'
     LANGUAGE C STRICT;

使用 Rust 开发 PostgreSQL 存储过程

https://my.oschina.net/u/1461794/blog/2353293

本文地址:https://codercto.com/soft/d/16864.html

The Java Language Specification, Java SE 7 Edition

The Java Language Specification, Java SE 7 Edition

James Gosling、Bill Joy、Guy L. Steele Jr.、Gilad Bracha、Alex Buckley / Addison-Wesley Professional / 2013-2-24 / USD 59.99

Written by the inventors of the technology, The Java(r) Language Specification, Java SE 7 Edition, is the definitive technical reference for the Java programming language. The book provides complete, ......一起来看看 《The Java Language Specification, Java SE 7 Edition》 这本书的介绍吧!

RGB转16进制工具
RGB转16进制工具

RGB HEX 互转工具

HTML 编码/解码
HTML 编码/解码

HTML 编码/解码

XML 在线格式化
XML 在线格式化

在线 XML 格式化压缩工具