<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>kaigai</author_name>
  <author_url>https://blog.hatena.ne.jp/kaigai/</author_url>
  <blog_title>KaiGaiの俺メモ</blog_title>
  <blog_url>https://kaigai.hatenablog.com/</blog_url>
  <categories>
    <anon>OSS/Linux</anon>
  </categories>
  <description>PostgreSQLにはCREATE FUNCTION命令という関数を定義するSQL構文があるが、そんなことしなくても使えるビルトイン関数というのが数多くある。 以下は、PostgreSQLのソースコードを修正してビルトイン関数を追加するためのメモ。 [手順] １. 関数の実体を実装する 返り値の型はDatumで、引数はPG_FUNCTION_ARGSというマクロを使用して定義する。 関数がコールされる時には、FunctionCallInfoDataオブジェクトへのポインタが渡されるが、別のマクロを利用して簡単に引数を参照できるようになっている。２．src/include/pg_proc.h …</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fkaigai.hatenablog.com%2Fentry%2F20061011%2F1160493000&quot; title=&quot;PostgreSQLビルトイン関数の定義 - KaiGaiの俺メモ&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2006-10-11 00:10:00</published>
  <title>PostgreSQLビルトイン関数の定義</title>
  <type>rich</type>
  <url>https://kaigai.hatenablog.com/entry/20061011/1160493000</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
