{"id":50678,"date":"2018-06-06T00:00:00","date_gmt":"2018-06-06T07:00:00","guid":{"rendered":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/%e6%9c%aa%e5%88%86%e9%a1%9e\/using-griddb-foreign-data-wrapper-postgresql\/"},"modified":"2026-03-31T17:05:49","modified_gmt":"2026-04-01T00:05:49","slug":"using-griddb-foreign-data-wrapper-postgresql","status":"publish","type":"post","link":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/using-griddb-foreign-data-wrapper-postgresql\/","title":{"rendered":"PostgreSQL\u7528\u306eGridDB\u5916\u90e8\u30c7\u30fc\u30bf\u30e9\u30c3\u30d1\u30fc\u3092\u4f7f\u3063\u3066\u307f\u3088\u3046"},"content":{"rendered":"<h2 id=\"intro\">\u5c0e\u5165<\/h2>\n<p>\u8907\u6570\u306e\u7570\u306a\u308b\u30a4\u30f3\u30bf\u30d5\u30a7\u30fc\u30b9\u304b\u3089\u30c7\u30fc\u30bf\u306b\u30a2\u30af\u30bb\u30b9\u3067\u304d\u308b\u3088\u3046\u306a\u67d4\u8edf\u6027\u304c\u5fc5\u8981\u3068\u306a\u308b\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002 \u305d\u306e\u3088\u3046\u306a\u5834\u5408\u3001\u3053\u308c\u307e\u3067\u306e\u591a\u304f\u306e\u30ec\u30ac\u30b7\u30fc\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3084\u30d3\u30b8\u30cd\u30b9\u30a4\u30f3\u30c6\u30ea\u30b8\u30a7\u30f3\u30b9\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3067\u306f\u3001\u5f93\u6765\u306eSQL\u30af\u30a8\u30ea\u3092\u4f7f\u7528\u3057\u3066\u30c7\u30fc\u30bf\u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3057\u305f\u3002 \u6700\u8fd1\u30ea\u30ea\u30fc\u30b9\u3055\u308c\u305fPostgreSQL\u3068GridDB\u306e<code>FOREIGN DATA WRAPPER <\/code>(\u5916\u90e8\u30c7\u30fc\u30bf\u30e9\u30c3\u30d1\u30fc)\u3067\u306f\u3001\u3088\u308a\u7c21\u5358\u306b\u30c7\u30fc\u30bf\u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002\u3053\u308c\u306f<a href=\"https:\/\/github.com\/pgspider\/griddb_fdw\" title=\"GridDB Foreign Data Wrapper for PostgreSQL repository\">Github<\/a>\u304b\u3089\u5165\u624b\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u3053\u306e\u30d6\u30ed\u30b0\u3067\u306f\u3001\u5916\u90e8\u30c7\u30fc\u30bf\u30e9\u30c3\u30d1\u30fc\u306e\u9069\u5207\u306a\u30d3\u30eb\u30c9\u3068\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306e\u65b9\u6cd5\u3068\u3001PostgreSQL\u306b\u304a\u3051\u308bGridDB\u30b5\u30fc\u30d0\u30fc\u5411\u3051<code> EXTENSION <\/code>\u306e\u4f5c\u6210\u65b9\u6cd5\u306b\u3064\u3044\u3066\u3054\u8aac\u660e\u3057\u307e\u3059\u3002 \u307e\u305f\u3001\u6a19\u6e96SQL\u30af\u30a8\u30ea\u3092\u4f7f\u7528\u3057\u3066GridDB\u30c7\u30fc\u30bf\u3092\u64cd\u4f5c\u3059\u308b\u65b9\u6cd5\u3068\u3001GridDB\u30b3\u30f3\u30c6\u30ca\u3092PostgreSQL\u306e\u30c6\u30fc\u30d6\u30eb\u30b9\u30ad\u30fc\u30de\u306b\u7c21\u5358\u306b\u5909\u63db\u3059\u308b\u65b9\u6cd5\u3092\u3054\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n<style>\nul {<br \/>\n    padding-left: 36px;<br \/>\n}<\/p>\n<p>.toc_container {<br \/>\n    background: blue none repeat scroll 0 0 !important;<br \/>\n    border: 1px solid #aaa !important;<br \/>\n    display: table !important;<br \/>\n    font-size: 95%;<br \/>\n    margin-bottom: 1em;<br \/>\n    padding: 20px;<br \/>\n    width: auto;<br \/>\n}<\/p>\n<p>.toc_title {<br \/>\n    font-weight: 700;<br \/>\n    text-align: center;<br \/>\n}<\/p>\n<p>.toc_container li, .toc_container ul, .toc_container ul li, .toc_container ol li{<br \/>\n    list-style: outside none none !important;<br \/>\n}<br \/>\n<\/style>\n<div id=\"toc-block\" style=\"background: #f9f9f9 none repeat scroll 0 0;border: 1px solid #aaa; padding: 20px; width: auto; display: table;margin-bottom: 1em;\">\n<h5 id=\"toc\">\u76ee\u6b21<\/h5>\n<div class=\"toc_container\">\n<ul id=\"toc-list\" style=\"list-style-type: none !important;\">\n<li>1 \u00a0\u00a0\u00a0<a href=\"#postgresql-source\">\u30bd\u30fc\u30b9\u304b\u3089PostgreSQL\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u69cb\u7bc9\u3059\u308b<\/a><\/li>\n<li>2 \u00a0\u00a0\u00a0<a href=\"#obtaining-fdw\">PostgreSQL\u7528\u306eGridDB\u5916\u90e8\u30c7\u30fc\u30bf\u30e9\u30c3\u30d1\u30fc\u306e\u5165\u624b\u3068\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/a><\/li>\n<li style=\"list-style: outside none none !important;\">\n<div class=\"inner-list\">\n<ul style=\"list-style-type: none !important; padding-left: 9px;\">\n<li>2.1 <a href=\"#verify-installation\">\u3088\u304f\u3042\u308b\u554f\u984c<\/a><\/li>\n<\/ul>\n<\/div>\n<\/li>\n<li>3 \u00a0\u00a0\u00a0<a href=\"#accessing-griddb\">PostgreSQL\u3068GridDB\u306e\u63a5\u7d9a<\/a><\/li>\n<li>4 \u00a0\u00a0\u00a0<a href=\"#table-access\">GridDB\u30b3\u30f3\u30c6\u30ca\u3078\u306e\u30a2\u30af\u30bb\u30b9<\/a><\/li>\n<li style=\"list-style: outside none none !important;\">\n<div class=\"inner-list\">\n<ul style=\"list-style-type: none !important; padding-left: 9px;\">\n<li>4.1 <a href=\"#viewing-containers\">\u95b2\u89a7\u53ef\u80fd\u306a\u30b3\u30f3\u30c6\u30ca\u306e\u8868\u793a<\/a><\/li>\n<li>4.2 <a href=\"#creating-foreign-table\">\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u306e\u4f5c\u6210<\/a><\/li>\n<li>4.3 <a href=\"#limitations\">\u5236\u9650\u4e8b\u9805<\/a><\/li>\n<li>4.4 <a href=\"#column-mapping\">\u5217\u30bf\u30a4\u30d7\u30ea\u30d5\u30a1\u30ec\u30f3\u30b9<\/a><\/li>\n<\/ul>\n<\/div>\n<\/li>\n<li>5 \u00a0\u00a0\u00a0<a href=\"#queries\">SQL\u30af\u30a8\u30ea\u306e\u767a\u884c<\/a><\/li>\n<li style=\"list-style: outside none none !important;\">\n<div class=\"inner-list\">\n<ul style=\"list-style-type: none !important; padding-left: 9px;\">\n<li>5.1 <a href=\"#selecting-data\">\u30c7\u30fc\u30bf\u306e\u9078\u629e<\/a><\/li>\n<li>5.2 <a href=\"#modifying-data\">\u30c7\u30fc\u30bf\u306e\u5909\u66f4<\/a><\/li>\n<li>5.3 <a href=\"#grouping-data\">\u30c7\u30fc\u30bf\u306e\u96c6\u7d04\u3068\u30b0\u30eb\u30fc\u30d7\u5316<\/a><\/li>\n<li>5.4 <a href=\"#merging-tables\">\u30c6\u30fc\u30d6\u30eb\u306e\u30de\u30fc\u30b8<\/a><\/li>\n<\/ul>\n<\/div>\n<\/li>\n<li>6 \u00a0\u00a0\u00a0<a href=\"#conclusion\">\u7d50\u8ad6<\/a><\/li>\n<li style=\"list-style: outside none none !important;\">\n<div class=\"inner-list\">\n<ul style=\"list-style-type: none !important; padding-left: 9px;\">\n<li>6.1 <a href=\"#reference\">\u53c2\u7167<\/a><\/li>\n<li>6.2 <a href=\"#source-code\">\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9<\/a><\/li>\n<\/ul>\n<\/div>\n<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<h3 id=\"postgresql-source\">\u30bd\u30fc\u30b9\u304b\u3089PostgreSQL\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u69cb\u7bc9\u3059\u308b<\/h3>\n<p><b> PostgreSQL\u7528\u306eGridDB\u5916\u90e8\u30c7\u30fc\u30bf\u30e9\u30c3\u30d1\u30fc<\/b>\u306e\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u3092\u30d3\u30eb\u30c9\u3059\u308b\u306e\u306b\u6700\u3082\u7c21\u5358\u306a\u65b9\u6cd5\u306f\u3001PostgreSQL\u3092\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u304b\u3089\u30d3\u30eb\u30c9\u3057\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3053\u3068\u3067\u3059\u3002\u73fe\u6642\u70b9\u3067\u3001PostgreSQL\u306eGridDB\u5916\u90e8\u30c7\u30fc\u30bf\u30e9\u30c3\u30d1\u30fc\u306fPostgreSQL\u30d0\u30fc\u30b8\u30e7\u30f3<a href=\"https:\/\/www.postgresql.org\/docs\/9.6\/static\/index.html\" title=\"PostgreSQL 9.6 Documentation\"> 9.6 <\/a>\u304a\u3088\u3073<a href=\"https:\/\/www.postgresql.org\/docs\/10\/static\/index.html\"> 10.0 <\/a>\u3068\u4e92\u63db\u6027\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u306e\u30d6\u30ed\u30b0\u3067\u306f\u3001PostgreSQL 9.6\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u7528\u3044\u3066\u8aac\u660e\u3057\u307e\u3059\u3002<\/p>\n<p>PostgreSQL\u306e<a href=\"https:\/\/www.postgresql.org\/ftp\/source\/v9.6.9\/\" title=\"PostgreSQL 9.6.9 source code\">ftp\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u30b5\u30a4\u30c8<\/a>\u304b\u3089\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u3092\u5165\u624b\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"prettyprint\">$ cd \/usr\/\n$ wget https:\/\/ftp.postgresql.org\/pub\/source\/v9.6.9\/postgresql-9.6.9.tar.gz\n$ tar xvfz postgresql-9.6.9.tar.gz\n<\/pre>\n<p><a href=\"https:\/\/www.postgresql.org\/docs\/9.6\/static\/install-procedure.html\" title=\"Installing PostgreSQL 9.6 from source\">\u3053\u306e\u30ac\u30a4\u30c9<\/a>\u306b\u5f93\u3044\u3001 PostgreSQL\u3092\u30d3\u30eb\u30c9\u3001\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3001\u30c6\u30b9\u30c8\u3057\u307e\u3059\u3002<\/p>\n<h3 id=\"obtaining-fdw\"> PostgreSQL\u7528\u306eGridDB\u5916\u90e8\u30c7\u30fc\u30bf\u30e9\u30c3\u30d1\u30fc\u306e\u5165\u624b\u3068\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h3>\n<p>\u3054\u4f7f\u7528\u306e\u30b7\u30b9\u30c6\u30e0\u3067PostgreSQL\u306e<i>\u3092\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u304b\u3089\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/i>\u3057\u305f\u3089\u3001PostgreSQL\u306e\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u30ea\u30dd\u30b8\u30c8\u30ea\u7528\u306eGridDB\u5916\u90e8\u30c7\u30fc\u30bf\u30e9\u30c3\u30d1\u30fc\u3092Githu\u304b\u3089\u53d6\u5f97\u3057\u307e\u3059\uff08\u30ea\u30dd\u30b8\u30c8\u30ea\u306e\u540d\u524d\u306f<code> griddb_fdw <\/code>\u3067\u3059\uff09\u3002 \u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306e<code> contrib <\/code>\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u7f6e\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"prettyprint\">$ cd \/path\/to\/postgresql\/source\/installation\/contrib\n$ git clone https:\/\/github.com\/pgspider\/griddb_fdw\n<\/pre>\n<p>PostgreSQL\u7528\u306eGridDB\u5916\u90e8\u30c7\u30fc\u30bf\u30e9\u30c3\u30d1\u30fc\u306b\u306f\u3001\u30d3\u30eb\u30c9\u6e08\u307f\u306e<b> GridDB C\u30af\u30e9\u30a4\u30a2\u30f3\u30c8<\/b>\u304c\u5fc5\u8981\u3067\u3059\u3002 <a href=\"https:\/\/github.com\/griddb\/c_client\"> GitHub <\/a>\u304b\u3089C\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u3092\u5165\u624b\u3057\u3001<code> README.md <\/code>\u306e\u6307\u793a\u306b\u5f93\u3063\u3066\u30d3\u30eb\u30c9\u3001\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059 \u3002<\/p>\n<ul>\n<li><b>\u6ce8\u610f: <\/b> PostgreSQL\u7528\u306eGridDB\u5916\u90e8\u30c7\u30fc\u30bf\u30e9\u30c3\u30d1\u30fc\u3092\u5b8c\u5168\u306b\u30d3\u30eb\u30c9\u3059\u308b\u305f\u3081\u306b\u306f\u3001C\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306e\u540d\u524d\u3092<code> c_client <\/code>\u3067\u306f\u306a\u304f<code> griddb <\/code>\u306b\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/li>\n<\/ul>\n<pre class=\"prettyprint\">$ cd griddb_fdw\n$ git clone https:\/\/github.com\/griddb\/c_client\n$ mv c_client griddb\n$ cd griddb\n## Follow the repository's README instructions for building the C client.\n<\/pre>\n<p>GridDB\u306eC\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306e\u8a2d\u5b9a\u3068\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306b\u95a2\u3057\u3066\u8a73\u3057\u304f\u306f\u3001C\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306eGithub\u30ea\u30dd\u30b8\u30c8\u30ea\u306e<code> README.md <\/code>\u30d5\u30a1\u30a4\u30eb\u304b\u3001\u307e\u305f\u306f<a href=\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/using-griddbs-cpythonruby-apis\/\" title=\"C \/ Python API Post\">GridDB\u306e\u69d8\u3005\u306aAPI\u306b\u95a2\u3059\u308b\u30d6\u30ed\u30b0<\/a>\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p><b> C\u30af\u30e9\u30a4\u30a2\u30f3\u30c8<\/b>\u304c\u30d3\u30eb\u30c9\u3055\u308c\u6b63\u3057\u304f\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u308b\u3068\u3001\u5916\u90e8\u30c7\u30fc\u30bf\u30e9\u30c3\u30d1\u30fc\u3092<code> griddb_fdw <\/code>\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u30d3\u30eb\u30c9\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"prettyprint\">$ cd \/path\/to\/griddb_fdw\n$ make\n$ make install\n<\/pre>\n<ul>\n<li><b>\u6ce8\u610f: <\/b> PostgreSQL\u7528\u306eGridDB\u5916\u90e8\u30c7\u30fc\u30bf\u30e9\u30c3\u30d1\u30fc\u3092\u30d3\u30eb\u30c9\u3059\u308b\u305f\u3081\u306b\u4f7f\u7528\u3055\u308c\u308b<code> Makefile <\/code>\u306f\u3001PostgreSQL\u306e<code> src \/ <\/code>\u304a\u3088\u3073<code> contrib \/ <\/code>\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u53c2\u7167\u3057\u307e\u3059\u3002 <i>\u30bd\u30fc\u30b9<!-- i-->\u304b\u3089PostgreSQL\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u5fc5\u8981\u306f\u3042\u308a\u307e\u305b\u3093\u3002<br \/>\n<\/i><\/li>\n<\/ul>\n<p><i><\/p>\n<h4 id=\"verify-installation\">\u3088\u304f\u3042\u308b\u554f\u984c<\/h4>\n<p>PostgreSQL\u7528\u306eGridDB\u5916\u90e8\u30c7\u30fc\u30bf\u30e9\u30c3\u30d1\u30fc\u304cSQL\u30af\u30a8\u30ea\u3067\u52d5\u4f5c\u3059\u308b\u305f\u3081\u306b\u3001\u3059\u3079\u3066\u306e<code> .o <\/code>\u3068<b>\u5b9f\u884c\u53ef\u80fd\u306a<\/b>\u30d5\u30a1\u30a4\u30eb\u306f\u3001\u30b7\u30b9\u30c6\u30e0\u4e0a\u306e<code>\/usr\/local\/pgsql\/share\/extension\/<\/code>\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u7f6e\u304b\u308c\u307e\u3059\u3002 \u901a\u5e38\u3001<code> make install <\/code>\u30b3\u30de\u30f3\u30c9\u306f\u3053\u308c\u3092\u81ea\u52d5\u7684\u306b\u884c\u3044\u307e\u3059\u304c\u3001\u6b21\u306e\u3088\u3046\u306a\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u305f\u5834\u5408\u306f\u3001<\/p>\n<pre class=\"prettyprint\">ERROR: could not open extension control file: \n<\/pre>\n<p>\u30b3\u30f3\u30d1\u30a4\u30eb\u3055\u308c\u305f<code> .o <\/code>\u30d5\u30a1\u30a4\u30eb\u3068<b> \u5b9f\u884c\u53ef\u80fd\u306a<\/b>\u30d5\u30a1\u30a4\u30eb\u3092<code>share\/extension<\/code>\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u30b3\u30d4\u30fc\u3059\u308b\u3068\u3088\u3044\u3067\u3057\u3087\u3046\u3002<\/p>\n<pre class=\"prettyprint\">$ cd \/path\/to\/postgresql\/source\/installation\/contrib\/griddb_fdw\n$ make clean\n$ make\n$ cp * \/usr\/local\/pgsql\/share\/extension\n<\/pre>\n<h3 id=\"accessing-griddb\"> PostgreSQL\u3068GridDB\u306e\u63a5\u7d9a<\/h3>\n<p>\u3053\u3053\u307e\u3067\u3067<b> PostgreSQL\u7528\u306eGridDB\u5916\u90e8\u30c7\u30fc\u30bf\u30e9\u30c3\u30d1\u30fc<\/b>\u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u305f\u306e\u3067\u3001PostgreSQL\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u4ecb\u3057\u3066<code> SQL <\/code>\u30af\u30a8\u30ea\u3092\u4f7f\u7528\u3057\u3066GridDB\u30c7\u30fc\u30bf\u306b\u30a2\u30af\u30bb\u30b9\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n<p>\u307e\u305a\u3001<code> CREATE EXTENSION <\/code>\u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u7528\u3057\u3066GridDB\u306ePostgreSQL\u306b\u62e1\u5f35\u6a5f\u80fd\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002 GridDB\u306e\u62e1\u5f35\u306e\u540d\u524d\u306f<code> 'griddb_fdw' <\/code>\u3067\u3059\u3002\u5916\u90e8\u30c7\u30fc\u30bf\u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b\u306b\u306f\u3001PostgreSQL\u306b\u5916\u90e8\u306e<code> SERVER <\/code>\u3068<code> USER MAPPING <\/code>\u304c\u5fc5\u8981\u3067\u3001GridDB\u306b\u63a5\u7d9a\u3057\u3066\u8a8d\u8a3c\u3057\u307e\u3059\u3002 GridDB\u30af\u30e9\u30b9\u30bf\u306b\u63a5\u7d9a\u3059\u308b\u305f\u3081\u306b\u5fc5\u8981\u306a\u8a2d\u5b9a\u306f\u3001\u3053\u308c\u3089\u306e\u30b3\u30de\u30f3\u30c9\u306e<code> OPTIONS <\/code>\u30d5\u30e9\u30b0\u3067\u6307\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<p>\u65e2\u5b58\u306e\u30b3\u30f3\u30c6\u30ca\u7528\u306e\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u3092GridDB\u30b5\u30fc\u30d0\u306b\u81ea\u52d5\u7684\u306b\u4f5c\u6210\u3057\u3001\u305d\u308c\u3089\u3092\u9078\u629e\u3057\u305fPostgreSQL\u306b\u30a4\u30f3\u30dd\u30fc\u30c8\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u3053\u308c\u306f<code> IMPORT FOREIGN SCHEMA <\/code>\u30b3\u30de\u30f3\u30c9\u3067\u884c\u3046\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002 GridDB\u306e\u30ea\u30e2\u30fc\u30c8\u30b9\u30ad\u30fc\u30de\u306e\u540d\u524d\u306f<code> 'griddb_schema' <\/code>\u3067\u3059\u3002\u6b21\u306e\u4f8b\u3067\u306f\u3001PostgreSQL\u306e<code> 'public' <\/code>\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u304b\u3089GridDB\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306b\u30a2\u30af\u30bb\u30b9\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"prettyprint\">-- GridDB\u306e\u30d3\u30eb\u30c9\u62e1\u5f35\u306e\u540d\u524d\u306f 'griddb_fdw'\u3067\u3059\nCREATE EXTENSION griddb_fdw;\n-- PostgreSQL\u3092\u4f7f\u7528\u3057\u3066GridDB\u30b5\u30fc\u30d0\u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b\u306b\u306f\u3001\u30db\u30b9\u30c8\u3001\u30dd\u30fc\u30c8\u3001\u30af\u30e9\u30b9\u30bf\u540d\u3001\u30e6\u30fc\u30b6\u30fc\u540d\u3001\u304a\u3088\u3073\u30d1\u30b9\u30ef\u30fc\u30c9\u304c\u5fc5\u8981\u3067\u3059\n--\u3053\u308c\u3089\u306f 'OPTIONS'\u30d5\u30a3\u30fc\u30eb\u30c9\u3067\u6307\u5b9a\u3067\u304d\u307e\u3059\nCREATE SERVER griddb_svr FOREIGN DATA WRAPPER griddb_fdw OPTIONS(host '239.0.0.1', port '31999', clustername 'defaultCluster');\nCREATE USER MAPPING FOR public SERVER griddb_svr OPTIONS(username 'admin', password 'admin');\n\n-- GridDB\u30b3\u30f3\u30c6\u30ca\u304b\u3089\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u3092\u4f5c\u6210\u3057\u3066\u30ed\u30fc\u30c9\u3059\u308b\u305f\u3081\u306b\u5fc5\u8981\u306a\u30ea\u30e2\u30fc\u30c8\u30b9\u30ad\u30fc\u30de\u306e\u540d\u524d\u306f 'griddb_schema'\u3067\u3059\u3002\nIMPORT FOREIGN SCHEMA griddb_schema FROM SERVER griddb_svr INTO public;\n<\/pre>\n<p>\u3053\u308c\u304c\u5b8c\u4e86\u3059\u308b\u3068\u3001\u5916\u90e8<code> SERVER <\/code>\u306f\u3001PostgreSQL\u306eGridDB\u5916\u90e8\u30c7\u30fc\u30bf\u30e9\u30c3\u30d1\u30fc\uff08<code> griddb_fdw <\/code>\u62e1\u5f35\uff09\u304c\u30c7\u30fc\u30bf\u30bd\u30fc\u30b9\u3068\u3057\u3066\u4f7f\u7528\u3059\u308b\u63a5\u7d9a\u60c5\u5831\u3092\u3001GridDB\u306b\u30ab\u30d7\u30bb\u30eb\u5316\u3057\u307e\u3059\u3002<\/p>\n<h3 id=\"table-access\">GridDB\u30b3\u30f3\u30c6\u30ca\u3078\u306e\u30a2\u30af\u30bb\u30b9<\/h3>\n<p>PostgreSQL\u7528\u306eGridDB\u5916\u90e8\u30c7\u30fc\u30bf\u30e9\u30c3\u30d1\u30fc\u304c\u8a2d\u5b9a\u3055\u308c\u3001PostgreSQL\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u304cGridDB\u30b5\u30fc\u30d0\u306b\u63a5\u7d9a\u3055\u308c\u308b\u3068\u3001<code> SQL <\/code>\u30af\u30a8\u30ea\u3067GridDB\u30b3\u30f3\u30c6\u30ca\u3068\u305d\u306e\u30c7\u30fc\u30bf\u306b\u30a2\u30af\u30bb\u30b9\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n<h4 id=\"viewing-containers\">\u95b2\u89a7\u53ef\u80fd\u306a\u30b3\u30f3\u30c6\u30ca\u306e\u8868\u793a<\/h4>\n<p>GridDB\u304b\u3089\u30a4\u30f3\u30dd\u30fc\u30c8\u3055\u308c\u305f\u5229\u7528\u53ef\u80fd\u306a<i>\u5916\u90e8\u30c6\u30fc\u30d6\u30eb<\/i>\u306f\u3059\u3079\u3066\u3001<code> information_schema._pg_foreign_tables <\/code>\u30c6\u30fc\u30d6\u30eb\u3092\u7167\u4f1a\u3057\u3066\u95b2\u89a7\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p><b>\u30af\u30a8\u30ea\u4f8b\uff1a <\/b><\/p>\n<pre class=\"prettyprint\">SELECT foreign_table_name FROM information_schema._pg_foreign_tables;\n<\/pre>\n<p><b>Example Output<\/b><\/p>\n<pre class=\"prettyprint\">foreign_table_name\n-------------------------\nemployee\ndepartment\njp_prefecture\njp_prefecture_readings\nwater_quality_ts_3\n<\/pre>\n<h4 id=\"creating-foreign-table\">\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u306e\u4f5c\u6210<\/h4>\n<p><code> griddb_schema <\/code>\u304b\u3089\u30a4\u30f3\u30dd\u30fc\u30c8\u3055\u308c\u305f\u30c6\u30fc\u30d6\u30eb\u304cGridDB\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u3059\u3079\u3066\u306e\u30b3\u30f3\u30c6\u30ca\u3092\u672c\u5f53\u306b\u53cd\u6620\u3057\u3066\u304a\u3089\u305a\u3001PostgreSQL\u3067\u305d\u306e\u30b3\u30f3\u30c6\u30ca\u306e\u30de\u30c3\u30d4\u30f3\u30b0\u3092\u624b\u52d5\u3067\u518d\u4f5c\u6210\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002 \u3053\u306e\u3088\u3046\u306a\u5834\u5408\u306b\u306f\u3001PostgreSQL\u306b<code> CREATE FOREIGN TABLE <\/code>\u30b3\u30de\u30f3\u30c9\u3092\u767a\u884c\u3059\u308b\u3053\u3068\u3067\u5bfe\u51e6\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u305f\u3068\u3048\u3070\u3001\u9818\u57df\u5185\u306e\u591a\u304f\u306e\u30bb\u30f3\u30b5\u30fc\u304b\u3089\u306e\u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7\u4ed8\u304d\u6e29\u5ea6\u306e\u8aad\u307f\u53d6\u308a\u5024\u3092\u8a18\u9332\u3059\u308b<code> jp_prefecture_readings <\/code>\u3068\u3044\u3046\u540d\u524d\u306eTimeSeries\u30b3\u30f3\u30c6\u30ca\u304c\u3042\u308a\u3001\u3053\u308c\u3092PostgreSQL\u306e<b> FOREIGN TABLE <\/b>\u3068\u3057\u3066\u30e2\u30c7\u30eb\u5316\u3057\u305f\u3044\u3068\u3057\u307e\u3059\u3002<\/p>\n<p><a href=\"https:\/\/github.com\/griddb\/griddb\"> GridDB Java API <\/a>\u3067\u306f\u4ee5\u4e0b\u306e<a href=\"https:\/\/griddb.net\/ja\/docs\/documents\/5-1-6_container-schema.php\">\u884c\u30b9\u30ad\u30fc\u30de<\/a>\u3092\u8a2d\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"prettyprint\">public class InstrumentLog {\n             @RowKey\n             public Date timestamp;  \/\/Timestamp Column (Primary Key for Timeseries containers)\n\n             public String weatherstationid; \/\/String column for the sensor of recording\n\n             public double temperature; \/\/Temperature reading (Double Column)\n\n             public Blob liveimage; \/\/Image recording (Binary Stream Data or Blob Column)\n}\n<\/pre>\n<p>\u4e0a\u8a18\u306eGridDB\u30b3\u30f3\u30c6\u30ca\u30b9\u30ad\u30fc\u30de\u306f\u3001PostgreSQL\u306e<code> FOREIGN TABLE <\/code>\u306e\u4e0b\u306b\u5909\u63db\u3055\u308c\u3001<b> SQL <\/b>\u3067\u64cd\u4f5c\u3067\u304d\u307e\u3059\u3002 \u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u3092\u4f5c\u6210\u3059\u308b\u3068\u304d\u306f\u3001PostgreSQL\u304c\u5916\u90e8\u30b3\u30f3\u30c6\u30ca\u3092\u898b\u3064\u3051\u308b\u305f\u3081\u306b\u4f7f\u7528\u3059\u308b<b>\u5916\u90e8\u30b5\u30fc\u30d0\u3092\u6307\u5b9a\u3059\u308b<\/b>\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"prettyprint\">CREATE FOREIGN TABLE jp_prefecture_readings (\n                  timestamp timestamp, \n                  weatherstationid text,\n                  temperature float,\n                  liveimage bytea\n) SERVER griddb_svr;\n<\/pre>\n<p>FOREIGN TABLE\u3092\u4f5c\u6210\u3059\u308b\u4e00\u822c\u7684\u306a\u5f62\u5f0f\u306f\u6b21\u306e\u3068\u304a\u308a\u3067\u3059\u3002<\/p>\n<pre class=\"prettyprint\">CREATE FOREIGN TABLE name_of_container_in_foreign_database (\n                 [ column_name column_type ]   \n) SERVER foreign_server_name;\n<\/pre>\n<p>PostgreSQL\u306e\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u3068\u305d\u308c\u306b\u5bfe\u5fdc\u3059\u308bGridDB\u30b3\u30f3\u30c6\u30ca\u306e\u4e21\u65b9\u306e\u30ab\u30e9\u30e0\u540d\u304c\u3001<code>column not found<\/code>\u30a8\u30e9\u30fc\u3092\u9632\u3050\u305f\u3081\u306b\u7b49\u4fa1\u3067\u3042\u308b\u3053\u3068\u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002 \u307e\u305f\u3001SQL\u30af\u30a8\u30ea\u306e<code> type mismatch <\/code>\u30a8\u30e9\u30fc\u3092\u9632\u3050\u305f\u3081\u306b\u3001\u5217\u30bf\u30a4\u30d7\u304c<a href=\"#column-mapping\">\u540c\u7b49\u3067\u3042\u308b<\/a>\u3053\u3068\u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<h4 id=\"limitations\">\u5236\u9650\u4e8b\u9805<\/h4>\n<p>PostgreSQL\u3092\u4f7f\u7528\u3057\u3066GridDB\u306e\u884c\u3092\u4f5c\u6210\u3057\u3066\u7834\u68c4\u3059\u308b\u3053\u3068\u306f\u3067\u304d\u307e\u3059\u304c\u3001\u683c\u7d0d\u3059\u308b\u5b9f\u969b\u306e\u30b3\u30f3\u30c6\u30ca\u306f\u4f5c\u6210\u3067\u304d\u306a\u3044\u3053\u3068\u306b\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002 \u3064\u307e\u308a\u3001PostgreSQL\u306e\u30af\u30a8\u30ea\u3092\u4f7f\u7528\u3057\u3066GridDB\u3067\u30b3\u30f3\u30c6\u30ca\u3092\u4f5c\u6210\u307e\u305f\u306f\u524a\u9664\u3059\u308b\u3053\u3068\u306f\u3067\u304d\u307e\u305b\u3093\u3002<\/p>\n<p><code>CREATE FOREIGN TABLE<\/code> \u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u306f\u3001PostgreSQL\u304cGridDB\u306e<b>\u65e2\u5b58\u306e<\/b>\u30b3\u30f3\u30c6\u30ca\u306b\u57fa\u3065\u3044\u3066\u4f7f\u7528\u3059\u308b\u30c6\u30fc\u30d6\u30eb\u30b9\u30ad\u30fc\u30de\u30de\u30c3\u30d4\u30f3\u30b0\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002 <code> DROP FOREIGN TABLE <\/code>\u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u306f\u3001PostgreSQL\u306e<code> information_schema._pg_foreign_tables <\/code>\u30c6\u30fc\u30d6\u30eb\u304b\u3089GridDB\u30b3\u30f3\u30c6\u30ca\u3092\u524a\u9664\u3057\u307e\u3059\u304c\u3001\u30b3\u30f3\u30c6\u30ca\u3068\u305d\u306e\u30c7\u30fc\u30bf\u306f\u305d\u306e\u307e\u307eGridDB\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306b\u6b8b\u3057\u307e\u3059\u3002 \u3064\u307e\u308a\u3001\u3082\u3046\u4e00\u5ea6<code> FOREIGN TABLE <\/code>\u3092\u4f5c\u6210\u3059\u308b\u307e\u3067PostgreSQL\u304b\u3089\u305d\u306e\u30c6\u30fc\u30d6\u30eb\u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b\u3053\u3068\u306f\u3067\u304d\u306a\u304f\u306a\u308a\u307e\u3059\u304c\u3001GridDB\u306eAPI\u307e\u305f\u306f <a href=\"https:\/\/griddb.net\/ja\/docs\/documents\/3-3_tql.php\" title=\"TQL\">TQL queries<\/a>\u3092\u4f7f\u3063\u3066\u30b3\u30f3\u30c6\u30ca\u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b\u3053\u3068\u306f\u3067\u304d\u307e\u3059\u3002<\/p>\n<h4 id=\"column-mapping\">\u5217\u30bf\u30a4\u30d7\u30ea\u30d5\u30a1\u30ec\u30f3\u30b9<\/h4>\n<p>GridDB\u306e\u307b\u3068\u3093\u3069\u306e\u30ab\u30e9\u30e0\u30bf\u30a4\u30d7\u306f\u3001\u5bfe\u5fdc\u3059\u308b\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u306e\u4f5c\u6210\u306b\u4f7f\u7528\u3067\u304d\u308bPostgreSQL\u306e\u540c\u7b49\u306e\u30bf\u30a4\u30d7\u3092\u6301\u3063\u3066\u3044\u307e\u3059\u3002 \u4ee5\u4e0b\u306f\u3001PostgreSQL\u306e\u30ab\u30e9\u30e0\u30bf\u30a4\u30d7\u306e\u3046\u3061\u3001\u5bfe\u5fdc\u304c\u305d\u308c\u307b\u3069\u660e\u767d\u3067\u306f\u306a\u3044\u3082\u306e\u3067\u3059\u3002<\/p>\n<table id=\"column-mappings\" style=\"padding-left: 5% !important; width: 100%; border-color: black !important;\" border=\"1\">\n<thead>\n<tr>\n<td style=\"padding-left: 5% !important;\">GridDB Column Type<\/td>\n<td style=\"padding-left: 5% !important;\">PostgreSQL Column Type<\/td>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"padding-left: 5% !important;\">bool, boolean<\/td>\n<td style=\"padding-left: 5% !important;\">boolean<\/td>\n<\/tr>\n<tr>\n<td style=\"padding-left: 5% !important;\">byte<\/td>\n<td style=\"padding-left: 5% !important;\">char<\/td>\n<\/tr>\n<tr>\n<td style=\"padding-left: 5% !important;\">double, float<\/td>\n<td style=\"padding-left: 5% !important;\">float, real<\/td>\n<\/tr>\n<tr>\n<td style=\"padding-left: 5% !important;\">blob<\/td>\n<td style=\"padding-left: 5% !important;\">bytea<\/td>\n<\/tr>\n<tr>\n<td style=\"padding-left: 5% !important;\">string<\/td>\n<td style=\"padding-left: 5% !important;\">text<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<ul>\n<li><b>\u6ce8\u610f\uff1a<\/b> PostgreSQL\u7528\u306eGridDB\u5916\u90e8\u30c7\u30fc\u30bf\u30e9\u30c3\u30d1\u30fc\u3092\u4f7f\u7528\u3057\u3066\u3001\u975e\u5e38\u306b\u5927\u304d\u306a\u5024\u3092\u6301\u3064<b> LONG <\/b>\u578b\u306e\u5217\u3092\u683c\u7d0d\u3059\u308b\u969b\u306b\u554f\u984c\u304c\u767a\u751f\u3059\u308b\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u308c\u306f\u3001\u5916\u90e8PostgreSQL\u30c6\u30fc\u30d6\u30eb\u306b\u5909\u63db\u3055\u308c\u305f\u3068\u304d\u306bGridDB\u30b3\u30f3\u30c6\u30ca\u306e<code> long <\/code>\u578b\u304c<code> integer <\/code>\u578b\u306b\u5207\u308a\u6368\u3066\u3089\u308c\u3066\u3044\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002 \u3053\u308c\u306b\u3088\u308a\u3001<b> 2147483647\u4ee5\u4e0a\u306e<b>\u6570\u5024\u30c7\u30fc\u30bf\u3092\u633f\u5165<\/b>\u3059\u308b\u969b\u306b\u554f\u984c\u304c\u767a\u751f\u3059\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002<\/b><\/li>\n<\/ul>\n<h3 id=\"queries\"> SQL\u30af\u30a8\u30ea\u306e\u767a\u884c<\/h3>\n<p>GridDB\u30b3\u30f3\u30c6\u30ca\u3092PostgreSQL\u306e\u30c6\u30fc\u30d6\u30eb\u306b\u30e9\u30c3\u30d7\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u305f\u306e\u3067\u3001TQL\u3067\u5229\u7528\u3067\u304d\u306a\u304b\u3063\u305fGridDB\u30c7\u30fc\u30bf\u306b\u591a\u304f\u306eSQL\u6a5f\u80fd\u3092\u7d44\u307f\u8fbc\u3080\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u307e\u305a\u3001\u30b3\u30f3\u30c6\u30ca\u304b\u3089\u500b\u3005\u306e\u5217\u3092\u9078\u629e\u3059\u308b\u304b\u3001<code> SELECT DISTINCT <\/code>\u5217\u306e\u5024\u3092\u9078\u629e\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<h4 id=\"selecting-data\">\u30c7\u30fc\u30bf\u306e\u9078\u629e<\/h4>\n<pre class=\"prettyprint\">-- SELECT\u30af\u30a8\u30ea\u304b\u3089 'liveimage'\uff08BLOB \/ BYTEA\u578b\uff09\u5217\u3092\u9664\u5916\u3059\u308b\nSELECT weatherstationid FROM jp_prefecture_readings ORDER BY weatherstationid ASC;\n\n-- \u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7\u6e2c\u5b9a\u5024\u304b\u3089\u3059\u3079\u3066\u306e\u30e6\u30cb\u30fc\u30af\u306a\u6e29\u5ea6\u5024\u3092\u898b\u3064\u3051\u308b\nSELECT DISTINCT temperature FROM jp_prefecture_readings ORDER BY temperature ASC;\n<\/pre>\n<p><b>Sample Output: <\/b><\/p>\n<pre class=\"prettyprint\">        name         | latitude | longitude \n---------------------+----------+-----------\n Hokkaido-Sapporo    | 43.06417 | 141.34694\n Aomori-Aomori       |    48.83 |    140.75\n Iwate-Morioka       | 39.70361 |  141.1525\n\n-- (snip)\n\n temperature \n-------------\n          50\n        55.6\n          70\n          80\n(4 rows)\n<\/pre>\n<h4 id=\"modifying-data\">\u30c7\u30fc\u30bf\u306e\u5909\u66f4<\/h4>\n<p>\u307e\u305f\u3001<code> INSERT <\/code>\u3001<code> UPDATE <\/code>\u3001<code> DELETE <\/code>\u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u3092\u542b\u3080SQL\u30af\u30a8\u30ea\u3067\u30c7\u30fc\u30bf\u3092\u5909\u66f4\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"prettyprint\">-- Insert Data into GridDB Containers\nINSERT INTO jp_prefecture (id,name,latitude,longitude,hascamera) \n  VALUES ('weather_station_48','Tsukishima',35.662,139.776,false);\n\nINSERT INTO jp_prefecture_readings (timestamp, weatherstationid, temperature, liveimage) \n  VALUES('2018-05-20 12:35:55.789','weather_station_0',55.6,bytea('x533435363741'));\n\n-- (snip)\n\n-- Update Queries\nUPDATE water_quality_ts_3 SET water_temperature = 18.5 WHERE beach_name LIKE '%met Beach';\n\nUPDATE jp_prefecture SET latitude = 48.83, longitude = 140.75 WHERE id = 'weather_station_2' AND name='Aomori-Aomori';\n\n-- (snip)\n-- Delete Data from GridDB Containers\nDELETE FROM jp_prefecture WHERE name='Tsukishima';\nDELETE FROM jp_prefecture_readings \n  WHERE weatherstationid LIKE '%0' AND temperature > 50.0 AND temperature <= 60.0;\n\n-- Delete all rows from a GridDB Container\nDELETE FROM jp_prefecture;\n<\/pre>\n<h4 id=\"grouping-data\">\u30c7\u30fc\u30bf\u306e\u96c6\u7d04\u3068\u30b0\u30eb\u30fc\u30d7\u5316<\/h4>\n<p><code> GROUP BY <\/code>\u53e5\u3092\u4f7f\u7528\u3057\u3066\u3001GridDB\u3092\u3088\u308a\u6df1\u3044\u30ec\u30d9\u30eb\u306b\u96c6\u7d04\u3057\u3066\u5206\u985e\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"prettyprint\">-- \u96c6\u7d04\u64cd\u4f5c\u3068\u30b0\u30eb\u30fc\u30d7\u5316\u64cd\u4f5c\n-- \u56fa\u6709\u306e\u6c17\u8c61\u30b9\u30c6\u30fc\u30b7\u30e7\u30f3\u306eID\u3054\u3068\u306b\u5e73\u5747\u6e29\u5ea6\u3092\u6c7a\u5b9a\u3057\u3066\u8868\u793a\u3059\u308b\n-- 'weatherstationid'\u306f\u3001\u500b\u3005\u306e\u5929\u6c17\u307e\u305f\u306f\u6c17\u5019\u30bb\u30f3\u30b5\u30fc\u3092\u8868\u3059\nSELECT weatherstationid, AVG(temperature) AS average_temp FROM jp_prefecture_readings \n  GROUP BY weatherstationid ORDER BY average_temp ASC;\n<\/pre>\n<p><b>Sample Output: <\/b><\/p>\n<pre class=\"prettyprint\">  weatherstationid  |   average_temp   \n--------------------+------------------\n weather_station_0  |             55.6\n weather_station_44 |               60\n weather_station_12 | 63.3333333333333\n weather_station_32 |               64\n weather_station_26 |               64\n weather_station_38 |               64\n weather_station_20 |               64\n weather_station_22 | 66.6666666666667\n weather_station_36 | 66.6666666666667\n weather_station_6  | 66.6666666666667\n weather_station_24 | 67.1428571428571\n weather_station_4  | 67.1428571428571\n weather_station_28 | 67.1428571428571\n weather_station_16 | 67.1428571428571\n weather_station_43 |             67.5\n weather_station_23 |             67.5\n weather_station_15 |             67.5\n weather_station_27 |             67.5\n weather_station_17 |             67.5\n<\/pre>\n<h4 id=\"merging-tables\">\u30c6\u30fc\u30d6\u30eb\u306e\u30de\u30fc\u30b8<\/h4>\n<p><b>\u8907\u6570\u306e\u5916\u90e8\u30c6\u30fc\u30d6\u30eb<\/b>\u307e\u305f\u306f<code> UNION <\/code>\u30af\u30a8\u30ea\u3092\u4f7f\u7528\u3057\u3066\u8907\u6570\u306e\u30b3\u30f3\u30c6\u30ca\u306e\u30c6\u30fc\u30d6\u30eb\u3092\u30de\u30fc\u30b8\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002 \u95a2\u9023\u3059\u308b\u5217\u306e\u5024\u3092\u5171\u6709\u3059\u308b\u30b3\u30f3\u30c6\u30ca\u306e\u30c7\u30fc\u30bf\u3092<code> JOIN <\/code>\u64cd\u4f5c\u3067\u30de\u30fc\u30b8\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"prettyprint\">-- Selecting from multiple tables\nSELECT jp.id, jp.latitude, jp.longitude, jpr.timestamp, jpr.temperature \n  FROM jp_prefecture jp, jp_prefecture_readings jpr WHERE jp.id = 'weather_station_18'\n  ORDER BY jpr.timestamp DESC;\n\n-- Join Operations\nSELECT jp.id, jp.latitude, jp.longitude, jpr.timestamp, jpr.temperature\n  FROM jp_prefecture jp INNER JOIN jp_prefecture_readings jpr ON jp.id = jpr.weatherstationid \n  ORDER BY jp.id ASC;\n\nSELECT jp.id AS left_id, jpr.weatherstationid AS right_id, jp.latitude, jp.longitude, jpr.timestamp, jpr.temperature\n  FROM jp_prefecture jp LEFT OUTER JOIN jp_prefecture_readings jpr ON jp.id = jpr.weatherstationid\n  ORDER BY jp.id ASC;\n\nSELECT jp.id AS left_id, jpr.weatherstationid AS right_id, jp.latitude, jp.longitude, jpr.timestamp, jpr.temperature\n  FROM jp_prefecture jp RIGHT OUTER JOIN jp_prefecture_readings jpr ON jp.id = jpr.weatherstationid\n  ORDER BY jp.id ASC;\n\nSELECT jp.id AS left_id, jpr.weatherstationid AS right_id, jp.latitude, jp.longitude, jpr.timestamp, jpr.temperature\n  FROM jp_prefecture jp FULL OUTER JOIN jp_prefecture_readings jpr ON jp.id = jpr.weatherstationid\n  ORDER BY jp.id ASC;\n\n-- Union operations\nSELECT id FROM jp_prefecture \n  UNION \nSELECT weatherstationid FROM jp_prefecture_readings;\n\nSELECT id FROM jp_prefecture \n  UNION ALL\nSELECT weatherstationid FROM jp_prefecture_readings;\n<\/pre>\n<h2 id=\"conclusion\">\u7d50\u8ad6<\/h2>\n<p>PostgreSQL\u7528\u306eGridDB\u306e\u5916\u90e8\u30c7\u30fc\u30bf\u30e9\u30c3\u30d1\u30fc\u3092\u4f7f\u3046\u3053\u3068\u3067\u3001\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u304cPostgreSQL\u306e\u3059\u3079\u3066\u306eGridDB\u30c7\u30fc\u30bf\u306b\u7c21\u5358\u304b\u3064\u8fc5\u901f\u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308b\u3068\u3044\u3046\u3053\u3068\u304c\u304a\u5206\u304b\u308a\u3044\u305f\u3060\u3051\u305f\u3067\u3057\u3087\u3046\u304b\u3002GridDB\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u5168\u4f53\u3092PostgreSQL\u306b\u79fb\u884c\u3059\u308b\u624b\u9593\u3068\u6642\u9593\u3092\u304b\u3051\u308b\u3053\u3068\u306a\u304f\u3001GridDB\u30b3\u30f3\u30c6\u30ca\u3092GridDB\u30af\u30e9\u30b9\u30bf\u304b\u3089PostgreSQL\u30c6\u30fc\u30d6\u30eb\u306b\u30b7\u30fc\u30e0\u30ec\u30b9\u3067\u81ea\u52d5\u7684\u306b\u5909\u63db\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u307e\u305f\u3001\u3053\u306eGridDB\u306e\u5916\u90e8\u30c7\u30fc\u30bf\u30e9\u30c3\u30d1\u30fc\u306b\u3088\u308a\u3001SQL\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u3092\u4f7f\u7528\u3057\u3066\u3044\u308b\u30ec\u30ac\u30b7\u30fc\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306bGridDB\u30c7\u30fc\u30bf\u3092\u7d44\u307f\u8fbc\u3080\u3053\u3068\u304c\u306f\u308b\u304b\u306b\u7c21\u5358\u306b\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002\u3053\u308c\u306b\u3088\u308a\u3001SQL\u30b7\u30b9\u30c6\u30e0\u3068\u30af\u30a8\u30ea\u306b\u3088\u308b\u30c7\u30fc\u30bf\u7ba1\u7406\u30c4\u30fc\u30eb\u3068\u3001GridDB\u306e\u9ad8\u901f\u3067\u30b9\u30b1\u30fc\u30e9\u30d6\u30eb\u306a\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u3092\u540c\u6642\u306b\u5f97\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<h3 id=\"reference\">\u53c2\u7167<\/h3>\n<ul id=\"reference-list\">\n<li>\u3053\u306e\u30d6\u30ed\u30b0\u3067\u306f<a href=\"https:\/\/github.com\/griddb\/griddb_nosql\/releases\/download\/v3.0.1\/griddb_nosql-3.0.1-1.linux.x86_64.rpm\" title=\"Download GridDB CE\">GridDB Community Edition 3.0.1<\/a> \u3092GridDB\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3068\u30b5\u30fc\u30d0\u30fc\u3068\u3057\u3066\u4f7f\u7528\u3057\u307e\u3057\u305f\u3002<\/li>\n<li>\u3053\u306e\u30d6\u30ed\u30b0\u3067\u4f7f\u7528\u3057\u305fGridDB C\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306f <b>open-source<\/b> version for <b>Community Edition<\/b>\u3067\u3001\u30b3\u30fc\u30c9\u306f<a href=\"https:\/\/github.com\/griddb\/c_client\/archive\/v3.0.1.tar.gz\" title=\"GridDB C Client Source Code\">\u3053\u3053<\/a>\u304b\u3089\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3067\u304d\u307e\u3059\u3002\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306fGridDB API \u30ea\u30d5\u30a1\u30ec\u30f3\u30b9\u306e\u4e2d\u306e <a href=\"http:\/\/www.griddb.org\/griddb_nosql\/manual\/GridDB_API_Reference.html#sec-6\" title=\"GridDB C client API reference\">\u3053\u3061\u3089\u306e\u30bb\u30af\u30b7\u30e7\u30f3<\/a> \u306b\u3042\u308a\u307e\u3059\u3002<\/li>\n<li> GridDB C\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u3068GridDB\u5916\u90e8\u30c7\u30fc\u30bf\u30e9\u30c3\u30d1\u30fc\u306f\u3044\u305a\u308c\u3082\u3001<a href=\"https:\/\/gcc.gnu.org\/gcc-4.8\/\">gcc version 4.8.5<\/a>\u3092\u4f7f\u7528\u3057\u3066\u69cb\u7bc9\u3057\u307e\u3057\u305f\u3002<\/li>\n<li>\u3053\u306e\u30d6\u30ed\u30b0\u306e\u3059\u3079\u3066\u306e\u30af\u30a8\u30ea\u3068\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u306f\u3001<b> CentOS 7.3\u30aa\u30da\u30ec\u30fc\u30c6\u30a3\u30f3\u30b0\u30b7\u30b9\u30c6\u30e0<\/b>\u4e0a\u3067\u5b9f\u884c\u3057\u307e\u3057\u305f\u3002<\/li>\n<li>\u3053\u306e\u30d6\u30ed\u30b0\u3067\u4f7f\u7528\u3057\u305f<br \/>\n<a href=\"https:\/\/www.postgresql.org\/\">PostgreSQL<\/a> version <b>9.6.9<\/b> \u306f\u3001<a href=\"https:\/\/www.postgresql.org\/docs\/9.6\/static\/sourcerepo.html\">source code<\/a>\u304b\u3089\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3057\u305f\u3002<\/li>\n<li> PostgreSQL\u7528\u306e<b>\u5916\u90e8\u30c7\u30fc\u30bf\u30e9\u30c3\u30d1\u30fc<\/b>\u306e\u8a73\u7d30\u306b\u3064\u3044\u3066\u306f\u3001\u3053\u3061\u3089<a href=\"https:\/\/wiki.postgresql.org\/wiki\/Foreign_data_wrappers\" title=\"Foreign Data Wrappers in PostgreSQL\">PostgreSQL wiki page<\/a>\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002<\/li>\n<li>\u30ea\u30ec\u30fc\u30b7\u30e7\u30ca\u30eb\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3084SQL\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092GridDB\u306b\u79fb\u884c\u3059\u308b\u65b9\u6cd5\u3092\u3088\u308a\u8a73\u3057\u304f\u77e5\u308a\u305f\u3044\u65b9\u306f\u3001<a href=\"https:\/\/griddb.net\/ja\/blog\/migrating-mysql-griddb\/\" title=\"MySQL to GridDB Migration\">MySQL to GridDB<\/a>\u3084<a href=\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/migrating-from-postgresql-to-griddb\/\" title=\"PostgreSQL to GridDB Migration\">PostgreSQL to GridDB<\/a>\u3092\u3054\u53c2\u7167\u304f\u3060\u3055\u3044\u3002\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u79fb\u884c\u307e\u305f\u306f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306b\u3064\u3044\u3066\u306f\u3001<a href=\"https:\/\/griddb.net\/ja\/docs\/documents\/6-5_migration-from-other-databases.php\" title=\"GridDB SE Import \/ Export Tools\">import and export functions<\/a>\u3084<a href=\"https:\/\/griddb.net\/ja\/evaluation\/\" title=\"GridDB SE Evaluation Form\">GridDB Standard Edition<\/a>\u3092\u3054\u53c2\u7167\u304f\u3060\u3055\u3044\u3002<\/li>\n<li>GridDB \u306f\u307e\u305f\u3001 SQL\u30af\u30a8\u30ea\u3084\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3068\u306e\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u306b\u3082\u4f7f\u3048\u308b<a href=\"https:\/\/griddb.net\/ja\/docs\/documents\/7-1_jdbc-connector.php\" title=\"GridDB JDBC Connector for Advanced Edition\">JDBC<\/a> \u3068<a href=\"https:\/\/griddb.net\/ja\/docs\/documents\/7-2_odbc-connector.php\" title=\"GridDB ODBC Connector for Advanced Edition\">ODBC<\/a> \u30b3\u30cd\u30af\u30bf\u3082\u63d0\u4f9b\u3057\u3066\u3044\u307e\u3059\u3002<\/li>\n<li> PostgreSQL\u306e<b>\u5916\u90e8\u30b5\u30fc\u30d0<\/b>\u306b\u3064\u3044\u3066\u306f\u3001<a href=\"https:\/\/robots.thoughtbot.com\/postgres-foreign-data-wrapper\">thoughtbot blog post<\/a>\u306b\u3082\u8a73\u3057\u304f\u8f09\u3063\u3066\u3044\u307e\u3059\u3002<\/li>\n<\/ul>\n<h4 id=\"source-code\">\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9<\/h4>\n<p>\u3053\u306e\u30d6\u30ed\u30b0\u3067\u4f7f\u7528\u3057\u305f\u3059\u3079\u3066\u306e\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u306f\u3001\u4e0b\u306e\u30ea\u30f3\u30af\u304b\u3089\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3067\u304d\u307e\u3059\u3002<\/p>\n<ul id=\"source-code-download\">\n<li>\n<a  data-e-Disable-Page-Transition=\"true\" class=\"download-link\" title=\"\" href=\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/ja\/\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\/25142\/?tmstv=1776018395\" rel=\"nofollow\" id=\"download-link-25142\" data-redirect=\"false\" >\n\tgriddb_postgresql_fdw_sample\t(1890 \u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\t)\n<\/a>\n<\/li>\n<\/ul>\n<p><\/i><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5c0e\u5165 \u8907\u6570\u306e\u7570\u306a\u308b\u30a4\u30f3\u30bf\u30d5\u30a7\u30fc\u30b9\u304b\u3089\u30c7\u30fc\u30bf\u306b\u30a2\u30af\u30bb\u30b9\u3067\u304d\u308b\u3088\u3046\u306a\u67d4\u8edf\u6027\u304c\u5fc5\u8981\u3068\u306a\u308b\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002 \u305d\u306e\u3088\u3046\u306a\u5834\u5408\u3001\u3053\u308c\u307e\u3067\u306e\u591a\u304f\u306e\u30ec\u30ac\u30b7\u30fc\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3084\u30d3\u30b8\u30cd\u30b9\u30a4\u30f3\u30c6\u30ea\u30b8\u30a7\u30f3\u30b9\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3067\u306f\u3001\u5f93\u6765\u306eSQL\u30af\u30a8 [&hellip;]<\/p>\n","protected":false},"author":123,"featured_media":50052,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1005],"tags":[],"class_list":["post-50678","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-1005"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>PostgreSQL\u7528\u306eGridDB\u5916\u90e8\u30c7\u30fc\u30bf\u30e9\u30c3\u30d1\u30fc\u3092\u4f7f\u3063\u3066\u307f\u3088\u3046 | GridDB: Open Source Time Series Database for IoT<\/title>\n<meta name=\"description\" content=\"\u5c0e\u5165 \u8907\u6570\u306e\u7570\u306a\u308b\u30a4\u30f3\u30bf\u30d5\u30a7\u30fc\u30b9\u304b\u3089\u30c7\u30fc\u30bf\u306b\u30a2\u30af\u30bb\u30b9\u3067\u304d\u308b\u3088\u3046\u306a\u67d4\u8edf\u6027\u304c\u5fc5\u8981\u3068\u306a\u308b\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/griddb.net\/ja\/\u672a\u5206\u985e\/using-griddb-foreign-data-wrapper-postgresql\/\" \/>\n<meta property=\"og:locale\" content=\"ja_JP\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"PostgreSQL\u7528\u306eGridDB\u5916\u90e8\u30c7\u30fc\u30bf\u30e9\u30c3\u30d1\u30fc\u3092\u4f7f\u3063\u3066\u307f\u3088\u3046 | GridDB: Open Source Time Series Database for IoT\" \/>\n<meta property=\"og:description\" content=\"\u5c0e\u5165 \u8907\u6570\u306e\u7570\u306a\u308b\u30a4\u30f3\u30bf\u30d5\u30a7\u30fc\u30b9\u304b\u3089\u30c7\u30fc\u30bf\u306b\u30a2\u30af\u30bb\u30b9\u3067\u304d\u308b\u3088\u3046\u306a\u67d4\u8edf\u6027\u304c\u5fc5\u8981\u3068\u306a\u308b\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/griddb.net\/ja\/\u672a\u5206\u985e\/using-griddb-foreign-data-wrapper-postgresql\/\" \/>\n<meta property=\"og:site_name\" content=\"GridDB: Open Source Time Series Database for IoT\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/griddbcommunity\/\" \/>\n<meta property=\"article:published_time\" content=\"2018-06-06T07:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-04-01T00:05:49+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/wp-content\/uploads\/2018\/09\/blog_title_27.png\" \/>\n\t<meta property=\"og:image:width\" content=\"870\" \/>\n\t<meta property=\"og:image:height\" content=\"490\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Joshua Pascascio\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@GridDBCommunity\" \/>\n<meta name=\"twitter:site\" content=\"@GridDBCommunity\" \/>\n<meta name=\"twitter:label1\" content=\"\u57f7\u7b46\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"Joshua Pascascio\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593\" \/>\n\t<meta name=\"twitter:data2\" content=\"3\u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/using-griddb-foreign-data-wrapper-postgresql\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/using-griddb-foreign-data-wrapper-postgresql\/\"},\"author\":{\"name\":\"Joshua Pascascio\",\"@id\":\"https:\/\/griddb.net\/en\/#\/schema\/person\/ca72185e9a3778df765a76313f789fd8\"},\"headline\":\"PostgreSQL\u7528\u306eGridDB\u5916\u90e8\u30c7\u30fc\u30bf\u30e9\u30c3\u30d1\u30fc\u3092\u4f7f\u3063\u3066\u307f\u3088\u3046\",\"datePublished\":\"2018-06-06T07:00:00+00:00\",\"dateModified\":\"2026-04-01T00:05:49+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/using-griddb-foreign-data-wrapper-postgresql\/\"},\"wordCount\":226,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/griddb.net\/en\/#organization\"},\"image\":{\"@id\":\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/using-griddb-foreign-data-wrapper-postgresql\/#primaryimage\"},\"thumbnailUrl\":\"\/wp-content\/uploads\/2018\/09\/blog_title_27.png\",\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/using-griddb-foreign-data-wrapper-postgresql\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/using-griddb-foreign-data-wrapper-postgresql\/\",\"url\":\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/using-griddb-foreign-data-wrapper-postgresql\/\",\"name\":\"PostgreSQL\u7528\u306eGridDB\u5916\u90e8\u30c7\u30fc\u30bf\u30e9\u30c3\u30d1\u30fc\u3092\u4f7f\u3063\u3066\u307f\u3088\u3046 | GridDB: Open Source Time Series Database for IoT\",\"isPartOf\":{\"@id\":\"https:\/\/griddb.net\/en\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/using-griddb-foreign-data-wrapper-postgresql\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/using-griddb-foreign-data-wrapper-postgresql\/#primaryimage\"},\"thumbnailUrl\":\"\/wp-content\/uploads\/2018\/09\/blog_title_27.png\",\"datePublished\":\"2018-06-06T07:00:00+00:00\",\"dateModified\":\"2026-04-01T00:05:49+00:00\",\"description\":\"\u5c0e\u5165 \u8907\u6570\u306e\u7570\u306a\u308b\u30a4\u30f3\u30bf\u30d5\u30a7\u30fc\u30b9\u304b\u3089\u30c7\u30fc\u30bf\u306b\u30a2\u30af\u30bb\u30b9\u3067\u304d\u308b\u3088\u3046\u306a\u67d4\u8edf\u6027\u304c\u5fc5\u8981\u3068\u306a\u308b\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002\",\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/using-griddb-foreign-data-wrapper-postgresql\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/using-griddb-foreign-data-wrapper-postgresql\/#primaryimage\",\"url\":\"\/wp-content\/uploads\/2018\/09\/blog_title_27.png\",\"contentUrl\":\"\/wp-content\/uploads\/2018\/09\/blog_title_27.png\",\"width\":870,\"height\":490},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/griddb.net\/en\/#website\",\"url\":\"https:\/\/griddb.net\/en\/\",\"name\":\"GridDB: Open Source Time Series Database for IoT\",\"description\":\"GridDB is an open source time-series database with the performance of NoSQL and convenience of SQL\",\"publisher\":{\"@id\":\"https:\/\/griddb.net\/en\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/griddb.net\/en\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ja\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/griddb.net\/en\/#organization\",\"name\":\"Fixstars\",\"url\":\"https:\/\/griddb.net\/en\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/griddb.net\/en\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/griddb.net\/wp-content\/uploads\/2019\/04\/fixstars_logo_web_tagline.png\",\"contentUrl\":\"https:\/\/griddb.net\/wp-content\/uploads\/2019\/04\/fixstars_logo_web_tagline.png\",\"width\":200,\"height\":83,\"caption\":\"Fixstars\"},\"image\":{\"@id\":\"https:\/\/griddb.net\/en\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/griddbcommunity\/\",\"https:\/\/x.com\/GridDBCommunity\",\"https:\/\/www.linkedin.com\/company\/griddb-by-toshiba\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/griddb.net\/en\/#\/schema\/person\/ca72185e9a3778df765a76313f789fd8\",\"name\":\"Joshua Pascascio\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/griddb.net\/en\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/872ef8be79cb5117c256feb4c279ac41b954bfba599d647db925185c449aff1c?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/872ef8be79cb5117c256feb4c279ac41b954bfba599d647db925185c449aff1c?s=96&d=mm&r=g\",\"caption\":\"Joshua Pascascio\"},\"url\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/ja\/author\/joshua\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"PostgreSQL\u7528\u306eGridDB\u5916\u90e8\u30c7\u30fc\u30bf\u30e9\u30c3\u30d1\u30fc\u3092\u4f7f\u3063\u3066\u307f\u3088\u3046 | GridDB: Open Source Time Series Database for IoT","description":"\u5c0e\u5165 \u8907\u6570\u306e\u7570\u306a\u308b\u30a4\u30f3\u30bf\u30d5\u30a7\u30fc\u30b9\u304b\u3089\u30c7\u30fc\u30bf\u306b\u30a2\u30af\u30bb\u30b9\u3067\u304d\u308b\u3088\u3046\u306a\u67d4\u8edf\u6027\u304c\u5fc5\u8981\u3068\u306a\u308b\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/griddb.net\/ja\/\u672a\u5206\u985e\/using-griddb-foreign-data-wrapper-postgresql\/","og_locale":"ja_JP","og_type":"article","og_title":"PostgreSQL\u7528\u306eGridDB\u5916\u90e8\u30c7\u30fc\u30bf\u30e9\u30c3\u30d1\u30fc\u3092\u4f7f\u3063\u3066\u307f\u3088\u3046 | GridDB: Open Source Time Series Database for IoT","og_description":"\u5c0e\u5165 \u8907\u6570\u306e\u7570\u306a\u308b\u30a4\u30f3\u30bf\u30d5\u30a7\u30fc\u30b9\u304b\u3089\u30c7\u30fc\u30bf\u306b\u30a2\u30af\u30bb\u30b9\u3067\u304d\u308b\u3088\u3046\u306a\u67d4\u8edf\u6027\u304c\u5fc5\u8981\u3068\u306a\u308b\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002","og_url":"https:\/\/griddb.net\/ja\/\u672a\u5206\u985e\/using-griddb-foreign-data-wrapper-postgresql\/","og_site_name":"GridDB: Open Source Time Series Database for IoT","article_publisher":"https:\/\/www.facebook.com\/griddbcommunity\/","article_published_time":"2018-06-06T07:00:00+00:00","article_modified_time":"2026-04-01T00:05:49+00:00","og_image":[{"width":870,"height":490,"url":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/wp-content\/uploads\/2018\/09\/blog_title_27.png","type":"image\/png"}],"author":"Joshua Pascascio","twitter_card":"summary_large_image","twitter_creator":"@GridDBCommunity","twitter_site":"@GridDBCommunity","twitter_misc":{"\u57f7\u7b46\u8005":"Joshua Pascascio","\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593":"3\u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/using-griddb-foreign-data-wrapper-postgresql\/#article","isPartOf":{"@id":"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/using-griddb-foreign-data-wrapper-postgresql\/"},"author":{"name":"Joshua Pascascio","@id":"https:\/\/griddb.net\/en\/#\/schema\/person\/ca72185e9a3778df765a76313f789fd8"},"headline":"PostgreSQL\u7528\u306eGridDB\u5916\u90e8\u30c7\u30fc\u30bf\u30e9\u30c3\u30d1\u30fc\u3092\u4f7f\u3063\u3066\u307f\u3088\u3046","datePublished":"2018-06-06T07:00:00+00:00","dateModified":"2026-04-01T00:05:49+00:00","mainEntityOfPage":{"@id":"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/using-griddb-foreign-data-wrapper-postgresql\/"},"wordCount":226,"commentCount":0,"publisher":{"@id":"https:\/\/griddb.net\/en\/#organization"},"image":{"@id":"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/using-griddb-foreign-data-wrapper-postgresql\/#primaryimage"},"thumbnailUrl":"\/wp-content\/uploads\/2018\/09\/blog_title_27.png","inLanguage":"ja","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/using-griddb-foreign-data-wrapper-postgresql\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/using-griddb-foreign-data-wrapper-postgresql\/","url":"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/using-griddb-foreign-data-wrapper-postgresql\/","name":"PostgreSQL\u7528\u306eGridDB\u5916\u90e8\u30c7\u30fc\u30bf\u30e9\u30c3\u30d1\u30fc\u3092\u4f7f\u3063\u3066\u307f\u3088\u3046 | GridDB: Open Source Time Series Database for IoT","isPartOf":{"@id":"https:\/\/griddb.net\/en\/#website"},"primaryImageOfPage":{"@id":"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/using-griddb-foreign-data-wrapper-postgresql\/#primaryimage"},"image":{"@id":"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/using-griddb-foreign-data-wrapper-postgresql\/#primaryimage"},"thumbnailUrl":"\/wp-content\/uploads\/2018\/09\/blog_title_27.png","datePublished":"2018-06-06T07:00:00+00:00","dateModified":"2026-04-01T00:05:49+00:00","description":"\u5c0e\u5165 \u8907\u6570\u306e\u7570\u306a\u308b\u30a4\u30f3\u30bf\u30d5\u30a7\u30fc\u30b9\u304b\u3089\u30c7\u30fc\u30bf\u306b\u30a2\u30af\u30bb\u30b9\u3067\u304d\u308b\u3088\u3046\u306a\u67d4\u8edf\u6027\u304c\u5fc5\u8981\u3068\u306a\u308b\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002","inLanguage":"ja","potentialAction":[{"@type":"ReadAction","target":["https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/using-griddb-foreign-data-wrapper-postgresql\/"]}]},{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/using-griddb-foreign-data-wrapper-postgresql\/#primaryimage","url":"\/wp-content\/uploads\/2018\/09\/blog_title_27.png","contentUrl":"\/wp-content\/uploads\/2018\/09\/blog_title_27.png","width":870,"height":490},{"@type":"WebSite","@id":"https:\/\/griddb.net\/en\/#website","url":"https:\/\/griddb.net\/en\/","name":"GridDB: Open Source Time Series Database for IoT","description":"GridDB is an open source time-series database with the performance of NoSQL and convenience of SQL","publisher":{"@id":"https:\/\/griddb.net\/en\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/griddb.net\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ja"},{"@type":"Organization","@id":"https:\/\/griddb.net\/en\/#organization","name":"Fixstars","url":"https:\/\/griddb.net\/en\/","logo":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/griddb.net\/en\/#\/schema\/logo\/image\/","url":"https:\/\/griddb.net\/wp-content\/uploads\/2019\/04\/fixstars_logo_web_tagline.png","contentUrl":"https:\/\/griddb.net\/wp-content\/uploads\/2019\/04\/fixstars_logo_web_tagline.png","width":200,"height":83,"caption":"Fixstars"},"image":{"@id":"https:\/\/griddb.net\/en\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/griddbcommunity\/","https:\/\/x.com\/GridDBCommunity","https:\/\/www.linkedin.com\/company\/griddb-by-toshiba"]},{"@type":"Person","@id":"https:\/\/griddb.net\/en\/#\/schema\/person\/ca72185e9a3778df765a76313f789fd8","name":"Joshua Pascascio","image":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/griddb.net\/en\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/872ef8be79cb5117c256feb4c279ac41b954bfba599d647db925185c449aff1c?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/872ef8be79cb5117c256feb4c279ac41b954bfba599d647db925185c449aff1c?s=96&d=mm&r=g","caption":"Joshua Pascascio"},"url":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/ja\/author\/joshua\/"}]}},"_links":{"self":[{"href":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/ja\/wp-json\/wp\/v2\/posts\/50678","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/ja\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/ja\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/ja\/wp-json\/wp\/v2\/users\/123"}],"replies":[{"embeddable":true,"href":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/ja\/wp-json\/wp\/v2\/comments?post=50678"}],"version-history":[{"count":3,"href":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/ja\/wp-json\/wp\/v2\/posts\/50678\/revisions"}],"predecessor-version":[{"id":55172,"href":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/ja\/wp-json\/wp\/v2\/posts\/50678\/revisions\/55172"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/ja\/wp-json\/wp\/v2\/media\/50052"}],"wp:attachment":[{"href":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/ja\/wp-json\/wp\/v2\/media?parent=50678"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/ja\/wp-json\/wp\/v2\/categories?post=50678"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/ja\/wp-json\/wp\/v2\/tags?post=50678"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}