Introduction to pg_cheat_funcs

208 Views

May 28, 16

スライド概要

pg_cheat_funcsはニッチな関数や機能を提供するPostgreSQL拡張モジュールです。このスライドでは、pg_cheat_funcsが提供する関数をいくつか取り上げて紹介します。

profile-image

PostgreSQL committer, Database Technical Lead at NTT DATA, maybe good husband & father.

シェア

またはPlayer版

埋め込む »CMSなどでJSが使えない場合

関連スライド

各ページのテキスト
1.

Introduction to pg_cheat_funcs Fujii Masao (@fujii_masao) PostgreSQL Unconference Tokyo 2016.05.28

2.

pg_cheat_funcsとは、 ニッチな関数や機能を提供する PostgreSQL拡張モジュール

3.

Install (1) Download the source code from https://github.com/MasaoFujii/pg_cheat_funcs (2) Compile $ make USE_PGXS=1 $ make USE_PGXS=1 install (3) Register to DB $ psql =# CREATE EXTENSION pg_cheat_funcs;

4.

pg_stat_get_memory_context() バックエンドのメモリ使用状況をビューとして返却する関数 9.6以降で使用可能 pg_stat_print_memory_context() バックエンドのメモリ使用状況をログ出力する関数

5.

pg_all_utf8() PostgreSQLで取り扱い可能なすべてのUTF-8文字を返却する関数 DBエンコーディングがUTF-8のDBのみで利用可能 pg_all_eucjp() PostgreSQLで取り扱い可能なすべてのEUC_JP文字を返却する関数 DBエンコーディングがEUC_JPのDBのみで利用可能

6.

pg_eucjp(code1, code2, code3) 引数のコードに対応するEUC_JP文字を返却する関数 DBエンコーディングがEUC_JPのDBのみで利用可能

7.

pg_set_next_xid(xid) トランザクションIDを設定変更する関数 pg_xid_assignment() トランザクションIDに関する情報をビューとして返却する関数

8.

pglz_compress(data) テキストデータをPGLZアルゴリズムで圧縮する関数 pglz_decompress(data) pglz_compress()で圧縮したデータを展開する関数

9.

開発ネタ募集