<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>healthyprog</author_name>
  <author_url>https://blog.hatena.ne.jp/healthyprog/</author_url>
  <blog_title>healthyprogのブログ</blog_title>
  <blog_url>https://healthyprog.hatenablog.com/</blog_url>
  <categories>
    <anon>PostgreSQLで学ぶシステムプログラミング</anon>
  </categories>
  <description> PostgreSQLを題材にシステムプログラミングを学ぼうと思う。 初めは簡単なところからということで、getenv関数について。 題材はPostgreSQL 10.0のコード。 getenvはstdlib.hに含まれるライブラリ関数です。その名の通りに引数にとった環境変数の値のポインタを取得。 取得できなかった場合はNULLを返す。 下記は、src/bin/scripts/createdb.cから抜粋。 NULLの場合を考慮して、if(gettnv(&quot;FOO&quot;))という書き方になっているのが分かります。 if (dbname == NULL) { if (getenv(&quot;PGDATABAS…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fhealthyprog.hatenablog.com%2Fentry%2F2018%2F01%2F16%2F192427&quot; title=&quot;getenvの使い方 - healthyprogのブログ&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>2018-01-16 19:24:27</published>
  <title>getenvの使い方</title>
  <type>rich</type>
  <url>https://healthyprog.hatenablog.com/entry/2018/01/16/192427</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
