{"id":50675,"date":"2018-03-27T00:00:00","date_gmt":"2018-03-27T07:00:00","guid":{"rendered":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/%e6%9c%aa%e5%88%86%e9%a1%9e\/migrating-from-postgresql-to-griddb\/"},"modified":"2025-11-14T07:53:40","modified_gmt":"2025-11-14T15:53:40","slug":"migrating-from-postgresql-to-griddb","status":"publish","type":"post","link":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/migrating-from-postgresql-to-griddb\/","title":{"rendered":"PostgreSQL\u304b\u3089GridDB\u3078\u306e\u79fb\u884c"},"content":{"rendered":"<h2 id=\"intro\">\u306f\u3058\u3081\u306b<\/h2>\n<p><a href=\"https:\/\/griddb.net\/ja\/blog\/migrating-mysql-griddb\/#migration\">\u4ee5\u524d\u306e\u30d6\u30ed\u30b0<\/a>\u3067\u3001Java\u3092\u4f7f\u7528\u3057\u3066\u30ea\u30ec\u30fc\u30b7\u30e7\u30ca\u30eb\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9MySQL\u3092\u79fb\u884c\u3059\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u3054\u7d39\u4ecb\u3057\u307e\u3057\u305f\u3002 \u3053\u306e\u30d6\u30ed\u30b0\u3067\u306f\u3001<a title=\"PostgreSQL homepage\" href=\"https:\/\/postgresql.org\">PostgreSQL database<\/a>\u3092Python\u3092\u4f7f\u3063\u3066GridDB\u3078\u79fb\u884c\u3059\u308b\u65b9\u6cd5\u3092\u3054\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n<p><a title=\"PostgreSQL Website\" href=\"https:\/\/www.postgresql.org\/\"> Postgresql <\/a>\u306f\u3001\u30d3\u30b8\u30cd\u30b9\u30a4\u30f3\u30c6\u30ea\u30b8\u30a7\u30f3\u30b9\u3001Web\u958b\u767a\u3001\u5546\u53d6\u5f15\u3001\u30d8\u30eb\u30b9\u30b1\u30a2\u3001\u751f\u7269\u85ac\u5b66\u3067\u5e83\u304f\u4f7f\u7528\u3055\u308c\u3066\u3044\u308b\u30ea\u30ec\u30fc\u30b7\u30e7\u30ca\u30eb\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3067\u3059\u3002 PostgreSQL\u306b\u306f\u5229\u70b9\u3082\u3042\u308b\u4e00\u65b9\u3067\u3001\u30b9\u30b1\u30fc\u30e9\u30d3\u30ea\u30c6\u30a3\u3068\u67d4\u8edf\u6027\u306b\u6b20\u3051\u308b\u3068\u3044\u3063\u305f\u3001\u4ed6\u306e\u30ea\u30ec\u30fc\u30b7\u30e7\u30ca\u30eb\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306b\u3088\u304f\u3042\u308a\u304c\u3061\u306a\u554f\u984c\u70b9\u304c\u3042\u308a\u307e\u3059\u3002 PostgreSQL\u306f\u307e\u305f\u3001\u7fd2\u5f97\u3059\u308b\u306e\u306b\u6642\u9593\u304c\u304b\u304b\u308a\u3001\u7279\u5b9a\u306e\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u3092\u6271\u3046\u969b\u306b\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u304c\u60aa\u304f\u306a\u308b\u3068\u3044\u3046\u6b20\u70b9\u3082\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u4e00\u65b9\u3001GridDB\u306f\u3001\u6c34\u5e73\u65b9\u5411\u306e<a href=\"https:\/\/griddb.net\/ja\/docs\/documents\/1-1_what-is-griddb.php#sec-1.1\">\u30b9\u30b1\u30fc\u30e9\u30d3\u30ea\u30c6\u30a3<\/a>\u306b\u512a\u308c\u3001NoSQL\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u67d4\u8edf\u6027\u3082\u5099\u3048\u3066\u3044\u307e\u3059\u3002\u307e\u305f\u3001<a title=\"GridDB Reliability Whitepaper\" href=\"https:\/\/griddb.net\/ja\/docs\/GridDB_Reliability_and_Robustness_1.0.7.pdf?x21046\">\u4fe1\u983c\u6027<\/a> \u3068 <a title=\"GridDB Replication\" href=\"https:\/\/griddb.net\/ja\/docs\/documents\/3-8_replication-distribution.php\">\u30a2\u30d9\u30a4\u30e9\u30d3\u30ea\u30c6\u30a3<\/a>\u306b\u52a0\u3048\u3066<i> ACID\u306b\u3082\u6e96\u62e0<\/i>\u3057\u3066\u3044\u307e\u3059\u3002GridDB\u306f\u307e\u305f\u3001\u30a4\u30f3\u30e1\u30e2\u30ea\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u3067\u512a\u308c\u305f\u6027\u80fd\u3092\u767a\u63ee\u3059\u308b\u305f\u3081\u3001IoT\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306a\u3069\u306b\u6700\u9069\u3067\u3042\u308b\u3068\u3044\u3048\u307e\u3059\u3002<\/p>\n<h3 id=\"use-case\">\u4e8b\u4f8b<\/h3>\n<p>\u5206\u304b\u308a\u3084\u3059\u304f\u3001\u524d\u56de\u306e\u30d6\u30ed\u30b0\u3067\u3054\u7d39\u4ecb\u3057\u305f\u306e\u3068\u540c\u3058\u4e8b\u4f8b\u3067\u3054\u8aac\u660e\u3057\u307e\u3059\u3002 \u3053\u306e\u30b7\u30ca\u30ea\u30aa\u306f\u3001<a title=\"Details of a PV Site\" href=\"https:\/\/griddb.net\/ja\/docs\/manuals\/v3.1\/GridDB_ProgrammingTutorial.html\">\u592a\u967d\u5149\u767a\u96fb\u6240(Photovoltaic site)<\/a>\uff08\u901a\u79f0PV\uff09\u306b\u304a\u3051\u308b\u3082\u306e\u3067\u3059\u3002\u3053\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u30c7\u30fc\u30bf\u306e\u5927\u90e8\u5206\u306f\u3001\u30bb\u30f3\u30b5\u30fc\u3068\u305d\u306e\u30bb\u30f3\u30b5\u30fc\u304c\u3042\u308b\u65bd\u8a2d\u304b\u3089\u9001\u4fe1\u3055\u308c\u305f\u6e2c\u5b9a\u5024\u3084\u60c5\u5831\u306a\u3069\u304c\u542b\u307e\u308c\u307e\u3059\u3002<\/p>\n<h3 id=\"griddb-model\">GridDB\u30c7\u30fc\u30bf\u30e2\u30c7\u30eb<\/h3>\n<p>PostgreSQL\u306fOracle Database\u3068MySQL\u306b\u975e\u5e38\u306b\u3088\u304f\u4f3c\u305f<i>\u30ea\u30ec\u30fc\u30b7\u30e7\u30ca\u30eb<\/i>\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306a\u3067\u3042\u308b\u305f\u3081\u3001\u4eca\u56de\u3082\u524d\u56de\u306e\u30d6\u30ed\u30b0\u3067\u4f7f\u3063\u305f\u3082\u306e\u3068\u540c\u3058\u30b5\u30f3\u30d7\u30eb\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002 \u3057\u305f\u304c\u3063\u3066\u3001PostgreSQL\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u30b9\u30ad\u30fc\u30de\u306f\u524d\u56de\u3068\u540c\u3058\u3067\u3059\u3002 \u79c1\u305f\u3061\u306eGridDB\u30c7\u30fc\u30bf\u30fb\u30e2\u30c7\u30eb\u3082\u524d\u56de\u3068\u540c\u3058\u3067\u3059\u304c\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306f<b> Python API <\/b>\u3092\u4f7f\u7528\u3057\u3066\u4f5c\u6210\u3057\u3066\u30c7\u30fc\u30bf\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n<p><a href=\"https:\/\/griddb.net\/wp-content\/uploads\/2018\/03\/postgres_migration.png\"><img fetchpriority=\"high\" decoding=\"async\" class=\"aligncenter size-large wp-image-23793\" src=\"https:\/\/griddb.net\/wp-content\/uploads\/2018\/03\/postgres_migration-1024x366.png\" alt=\"\" width=\"1024\" height=\"366\"><\/a><\/p>\n<p>PostgreSQL\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306b\u306f<b> 4\u3064\u306e\u30c6\u30fc\u30d6\u30eb<\/b>\u304c\u3042\u308a\u3001GridDB\u3067\u306f<b> 4\u3064\u306e\u30b3\u30f3\u30c6\u30ca\u30b9\u30ad\u30fc\u30de<\/b>\u306b\u5909\u63db\u3055\u308c\u307e\u3059\u3002 \u8a73\u3057\u304f\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>\n<li><b>Facilities:<\/b> Contains information and specifications for the facilities of the PV site.<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<div>\n<div style=\"width: 50%; float: left;\">\n<div style=\"text-align: center; width: 90%;\"><b>PostgreSQL Facilities Table<\/b><\/div>\n<p>&nbsp;<\/p>\n<pre class=\"prettyprint\" style=\"width: 90%;\">CREATE TABLE IF NOT EXISTS facilities (\n\tfacilityId VARCHAR(20) PRIMARY KEY,\n\tname VARCHAR(50) NOT NULL,\n\tspecifications BYTEA\n);\n<\/pre>\n<\/div>\n<div style=\"width: 50%; float: left;\">\n<div style=\"width: 90%; text-align: center;\"><b>GridDB Facility Container Schema<\/b><\/div>\n<p>&nbsp;<\/p>\n<pre class=\"prettyprint\" style=\"width: 90%;\">facilities = gridstore.put_container(\"facilities\",\n                        [(\"facilityId\",griddb.GS_TYPE_STRING),\n\t\t\t(\"name\",griddb.GS_TYPE_STRING),\n                        (\"specifications\",griddb.GS_TYPE_BLOB)],\n\t\t\tgriddb.GS_CONTAINER_COLLECTION)\n<\/pre>\n<\/div>\n<div style=\"clear: both;\"><\/div>\n<\/div>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>\n<li><b>Sensor:<\/b> Stores general information like <i>sensor-type<\/i> and name on the PV site&#8217;s sensors<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<div style=\"display: block;\">\n<div style=\"width: 50%; float: left;\">\n<div style=\"text-align: center; width: 90%;\"><b>PostgreSQL Sensor Table<\/b><\/div>\n<p>&nbsp;<\/p>\n<pre class=\"prettyprint\" style=\"width: 90%;\">CREATE TABLE IF NOT EXISTS sensors (\n\tsensorId VARCHAR(40) PRIMARY KEY,\n\tfacilityId VARCHAR(20) REFERENCES facilities(facilityId) \n           ON DELETE CASCADE ON UPDATE CASCADE,\n\tname VARCHAR(50) NOT NULL,\n\ttype VARCHAR(50) NOT NULL\n);\n<\/pre>\n<\/div>\n<div style=\"width: 50%; float: left;\">\n<div style=\"text-align: center; width: 90%;\"><b>GridDB Sensor Container Schema<\/b><\/div>\n<p>&nbsp;<\/p>\n<pre class=\"prettyprint\" style=\"width: 90%;\">facility = gridstore.put_container(\"facility_1\",\n                [(\"sensorId\",griddb.GS_TYPE_STRING),\n\t\t(\"name\",griddb.GS_TYPE_STRING),\n                (\"type\",griddb.GS_TYPE_STRING)],\n                 griddb.GS_CONTAINER_COLLECTION)\n           \n\n<\/pre>\n<\/div>\n<div style=\"clear: both;\"><\/div>\n<\/div>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>\n<li><b>Readings:<\/b> Stores the <i>timestamps and values<\/i> of the measurements recorded by the PV site&#8217;s sensors<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<div style=\"display: block;\">\n<div style=\"width: 50%; float: left;\">\n<div style=\"text-align: center; width: 90%;\"><b>PostgreSQL Reading Table<\/b><\/div>\n<p>&nbsp;<\/p>\n<pre class=\"prettyprint\" style=\"width: 90%;\">CREATE TABLE IF NOT EXISTS readings (\n\trecordId SERIAL PRIMARY KEY,\n\tsensorId VARCHAR(40) REFERENCES sensors(sensorId) \n            ON DELETE CASCADE ON UPDATE CASCADE,\n\tts TIMESTAMP DEFAULT NOW() NOT NULL,\n\tvalue REAL NOT NULL,\n\tstatus VARCHAR(255) NOT NULL\n);\n<\/pre>\n<\/div>\n<div style=\"width: 50%; float: left;\">\n<div style=\"text-align: center; width: 90%;\"><b>GridDB Reading Container Schema<\/b><\/div>\n<p>&nbsp;<\/p>\n<pre class=\"prettyprint\" style=\"width: 90%;\">timeseries = gridstore.put_container(\"sensor_1\",\n                [(\"timestamp\",griddb.GS_TYPE_TIMESTAMP),\n\t\t(\"value\",griddb.GS_TYPE_DOUBLE),\n                (\"status\",griddb.GS_TYPE_STRING)],\n\t\tgriddb.GS_CONTAINER_TIME_SERIES)\n\n\n\n<\/pre>\n<\/div>\n<div style=\"clear: both;\"><\/div>\n<\/div>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>\n<li><b>Alerts:<\/b> Stores information related to <i>alerts and notifications<\/i> sent by the sensors<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<div style=\"display: block;\">\n<div style=\"width: 50%; float: left;\">\n<div style=\"text-align: center; width: 90%;\"><b>PostgreSQL Alerts Table<\/b><\/div>\n<p>&nbsp;<\/p>\n<pre class=\"prettyprint\" style=\"width: 90%;\">CREATE TABLE IF NOT EXISTS alerts (\n\talertId SERIAL PRIMARY KEY,\n\tts TIMESTAMP DEFAULT NOW() NOT NULL,\n\tfacilityId VARCHAR(20) REFERENCES facilities(facilityId) \n            ON DELETE CASCADE ON UPDATE CASCADE,\n\tsensorId VARCHAR(40) REFERENCES sensors(sensorId) \n            ON DELETE CASCADE ON UPDATE CASCADE,\n\tlevel INT NOT NULL,\n\tdetail VARCHAR(255) NOT NULL\n);\n<\/pre>\n<\/div>\n<div style=\"width: 50%; float: left;\">\n<div style=\"text-align: center; width: 90%;\"><b>GridDB Alerts Container Schema<\/b><\/div>\n<p>&nbsp;<\/p>\n<pre class=\"prettyprint\" style=\"width: 90%;\">alerts_col = gridstore.put_container(\"alerts\",\n                [(\"id\",griddb.GS_TYPE_INTEGER),\n\t\t(\"timestamp\",griddb.GS_TYPE_TIMESTAMP),\n                (\"facilityId\",griddb.GS_TYPE_STRING),\n\t\t(\"sensorId\",griddb.GS_TYPE_STRING),\n                (\"level\",griddb.GS_TYPE_INTEGER),\n                (\"detail\",griddb.GS_TYPE_STRING)],\n\t\tgriddb.GS_CONTAINER_COLLECTION)\n\n\n<\/pre>\n<\/div>\n<div style=\"clear: both;\"><\/div>\n<\/div>\n<h3 id=\"migration\">\u79fb\u884c\u306e\u5b9f\u884c<\/h3>\n<p>\u3053\u3053\u307e\u3067\u3067PostgreSQL\u3068GridDB\u306e\u4e21\u65b9\u306b\u30b9\u30ad\u30fc\u30de\u3068\u30c7\u30fc\u30bf\u30e2\u30c7\u30eb\u3092\u8a2d\u5b9a\u3057\u3001\u30c7\u30fc\u30bf\u79fb\u884c\u306e\u6e96\u5099\u304c\u3067\u304d\u307e\u3057\u305f\u3002PostgreSQL\u306e\u5404\u30c6\u30fc\u30d6\u30eb\u304b\u3089\u3059\u3079\u3066\u306e<i>rows<\/i>\u3092<code>SELECT<\/code>\u3057\u3001\u518d\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u3057\u3066GridDB <code>Row<\/code>\u306b\u518d\u914d\u7f6e\u3057\u307e\u3059\u3002 \u6b21\u306b\u3001\u305d\u306e\u884c\u3092\u5bfe\u5fdc\u3059\u308b<code> Collection <\/code>\u307e\u305f\u306f<code> Timeseries <\/code>(\u6642\u7cfb\u5217) \u30b3\u30f3\u30c6\u30ca\u306b\u633f\u5165\u3057\u307e\u3059\u3002<\/p>\n<p>\u53c2\u8003\u307e\u3067\u306b\u3001\u79fb\u884c\u3055\u308c\u308bPostgreSQL\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u540d\u524d\u306f<code> 'pv' <\/code>\u3067\u3059\u3002<\/p>\n<h4 id=\"python-apis\">Python API\u3068\u30b3\u30cd\u30af\u30bf\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h4>\n<p>\u307e\u305a\u3001PostgreSQL\u3067Python\u3092\u4f7f\u7528\u3059\u308b\u306b\u306f\u3001<a href=\"https:\/\/pypi.python.org\/pypi\/psycopg2\">psycopg2 package<\/a>\u304c\u5fc5\u8981\u3067\u3059\u3002 Python\u304b\u3089GridDB\u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b\u306b\u306f\u3001<a title=\"GridDB Python package\" href=\"https:\/\/pypi.python.org\/pypi\/griddb-python-client\">griddb_python_client package<\/a>\u3082\u5fc5\u8981\u3067\u3059\u3002 \u3053\u308c\u3089\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u306f\u4e21\u65b9\u3068\u3082\u3001<code>pip<\/code>\u30d1\u30c3\u30b1\u30fc\u30b8\u30a4\u30f3\u30b9\u30c8\u30fc\u30e9\u3092\u4f7f\u7528\u3057\u3066\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"prettyprint\">$ python -m pip install psycopg2\n$ python -m pip install griddb_python_client\n<\/pre>\n<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304c\u5b8c\u4e86\u3057\u305f\u3089\u3001<a title=\"Connect to PostgreSQL using Python\" href=\"https:\/\/wiki.postgresql.org\/wiki\/Using_psycopg2_with_PostgreSQL#Connect_to_Postgres\">pscycopg2\u3092\u4f7f\u3063\u3066<\/a> PostgreSQL\u306e<i>pv<\/i>\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306b\u63a5\u7d9a\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002GridDB\u30af\u30e9\u30b9\u30bf\u306b\u306f<a title=\"Connecting to GridDB with Python\" href=\"https:\/\/griddb.net\/ja\/blog\/using-griddbs-cpythonruby-apis\/#connect-python\">Python\u3092\u4f7f\u3063\u3066<\/a>\u63a5\u7d9a\u3057\u307e\u3059\u3002<\/p>\n<h4 id=\"migrate-facilities\">\u65bd\u8a2d\u30c6\u30fc\u30d6\u30eb\u306e\u79fb\u884c<\/h4>\n<p>\u65bd\u8a2d\u3092\u683c\u7d0d\u3059\u308b\u305f\u3081\u306bGridDB\u3067<code>Collection<\/code>\u30b3\u30f3\u30c6\u30ca\u3092\u4f5c\u6210\u3057\u305f\u3089\u3001PostgreSQL\u306e<b>\u65bd\u8a2d<\/b>\u30c6\u30fc\u30d6\u30eb\u304b\u3089\u3059\u3079\u3066\u306e\u884c\u306b\u30a2\u30af\u30bb\u30b9\u3057\u3066\u79fb\u884c\u3067\u304d\u307e\u3059\u3002\u307e\u305a\u3001PostgreSQL\u306efacilities\u30c6\u30fc\u30d6\u30eb\u304b\u3089<code> row cursor <\/code>\u3092\u53d6\u5f97\u3057\u307e\u3059\u3002 <code> row cursor <\/code>\u306f\u3001\u884c\u306e<b> \u5217\u306e\u5024<\/b>\u306e<b> \u914d\u5217<\/b>\u3092\u8fd4\u3057\u307e\u3059\u3002<\/p>\n<p>\u3059\u3079\u3066\u306e\u5217\u306e\u5024\u306f\u3001Python\u3067<i>\u9069\u5207\u306a\u578b<\/i>\u306b\u5909\u63db\u3055\u308c\u307e\u3059\u3002\u3064\u307e\u308a\u3001\u5024\u306e\u89e3\u6790\u3084\u578b\u306e\u5909\u63db\u306f\u5fc5\u8981\u3042\u308a\u307e\u305b\u3093\u3002\u5404\u884c\u306b\u5bfe\u3057\u3066\u8fd4\u3055\u308c\u305f<b>\u5217\u306e\u6570<\/b>\u306b\u5bfe\u3057\u3066<i>\u6b63\u3057\u3044\u91cf\u306e\u5909\u6570<\/i>\u3092\u4f5c\u6210\u3059\u308b\u9650\u308a\u3001\u884c\u306e\u500b\u3005\u306e\u5024\u3092\u3059\u3079\u3066\u53d6\u5f97\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u3059\u3079\u3066\u306e\u884c\u306e\u5217\u306e\u5024\u3092\u53d6\u5f97\u3057\u305f\u3089\u3001GridDB\u306e\u884c\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u6210\u3057\u3001\u305d\u308c\u306b\u5fdc\u3058\u3066\u3059\u3079\u3066\u306e<code> row fields <\/code>\u3092\u8a2d\u5b9a\u3067\u304d\u307e\u3059\u3002\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u9593\u306e\u578b\u306e\u5909\u63db\u306f\u3001\u6587\u5b57\u5217\u3084\u6570\u5024\u306a\u3069\u306e\u578b\u306b\u5bfe\u3057\u3066\u3053\u306e\u3088\u3046\u306b\u51e6\u7406\u3055\u308c\u307e\u3059\u3002GridDB<a title=\"Collections in GridDB\" href=\"https:\/\/griddb.net\/ja\/docs\/documents\/3-2_key-container-model.php#sec-1.1\">\u30b3\u30ec\u30af\u30b7\u30e7\u30f3<\/a>\u306b\u633f\u5165\u3059\u308b\u524d\u306bPostgreSQL\u306e<code> BLOB <\/code>\u5024\u3092<code> bytearray <\/code>\u306b\u5909\u63db\u3059\u308b\u3053\u3068\u3092\u5fd8\u308c\u305a\u306b\u884c\u3063\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"prettyprint\">query = \"SELECT * FROM facilites\"\n\ncursor = connection.cursor() #Obtain row cursor from PostgreSQL connection\ncursor.execute(query)\n\nrow = cursor.fetchone()\nwhile row is not None:\n        ## Get all id, name, and specification column values from row\n        facility_id, name, blob = row\n\n        facility_row = facilities.create_row()\n\n        facility_row.set_field_by_string(0,facility_id)\n        facility_row.set_field_by_string(1,name)\n        facility_row.set_field_by_blob(2,bytearray(blob)) ## Convert Blob data to bytearray\n\n        ret = facilities.put_row(facility_row)\n<\/pre>\n<h4 id=\"migrate-sensors\">\u30bb\u30f3\u30b5\u30fc\u30c7\u30fc\u30bf\u306e\u79fb\u884c<\/h4>\n<p><i>\u65bd\u8a2d<\/i>\u30c6\u30fc\u30d6\u30eb\u306e\u79fb\u884c\u4e2d\u306b\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u5185\u306e\u3059\u3079\u3066\u306e\u65bd\u8a2d\u306e<code> facility_id <\/code>\u3092\u53d6\u5f97\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002 \u3053\u306eFacility ID\u3092\u4f7f\u7528\u3057\u3066\u305d\u306e\u65bd\u8a2d\u306e<code> sensor_collection <\/code>\u3092\u4f5c\u6210\u3057\u3001\u30bb\u30f3\u30b5\u30fc\u306b\u60c5\u5831\u3092\u683c\u7d0d\u3057\u307e\u3059\u3002<\/p>\n<p>\u307e\u305a\u3001PostgreSQL\u306e\u4e2d\u3067<b> facility id <\/b>\u3092\u6301\u3064<code> sensors <\/code>\u30c6\u30fc\u30d6\u30eb\u306e\u3059\u3079\u3066\u306e\u884c\u3092\u53d6\u5f97\u3057\u307e\u3059\u3002 GridDB\u306e<b>\u30bb\u30f3\u30b5\u30fc<\/b>\u30b3\u30f3\u30c6\u30ca\u306e\u884c\u306b\u306f<i> facility_id <\/i>\u5217\u304c\u306a\u3044\u305f\u3081\u3001\u3053\u306e\u5217\u3092PostgreSQL\u304b\u3089\u53d6\u5f97\u3059\u308b\u5fc5\u8981\u306f\u3042\u308a\u307e\u305b\u3093\u3002<\/p>\n<p>\u65bd\u8a2d\u306e\u30bb\u30f3\u30b5\u30fc\u306e\u305f\u3081\u306b<i> Collection\u30b3\u30f3\u30c6\u30ca<\/i>\u3092\u4f5c\u6210\u3057\u305f\u5f8c\u306f\u3001\u5148\u307b\u3069\u3068\u540c\u69d8\u306bPostgreSQL\u306e\u884c\u3092\u89e3\u6790\u3057\u3001\u305d\u308c\u3089\u3092GridDB\u5185\u306e\u65bd\u8a2d<i> Collection <\/i>\u306b\u633f\u5165\u3059\u308b\u3068\u3044\u3046\u540c\u3058\u30d7\u30ed\u30bb\u30b9\u3092\u884c\u3044\u307e\u3059\u3002<\/p>\n<pre class=\"prettyprint\">facility = \"facility_1\"\nquery = \"SELECT sensorId,name,type FROM sensors WHERE facilityId='%s'\" % (facility)\n\ncursor = connection.cursor()\ncursor.execute(query)\nrow = cursor.fetchone()\n\nwhile row is not None:\n        sensor_id, name, sensor_type = row\n\n        sensor = sensor_collection.create_row()\n\n        sensor.set_field_by_string(0,sensor_id)\n        sensor.set_field_by_string(1,name)\n        sensor.set_field_by_string(2,sensor_type)\n\n        ret = sensor_collection.put_row(sensor)\n<\/pre>\n<h4 id=\"migrate-readings\">\u30bb\u30f3\u30b5\u30fc\u5024\u306e\u79fb\u884c<\/h4>\n<p><i>\u30bb\u30f3\u30b5\u30fc<\/i> \u306ePostgreSQL\u30c6\u30fc\u30d6\u30eb\u3092\u79fb\u884c\u3059\u308b\u3068\u304d\u306b\u5404\u30bb\u30f3\u30b5\u30fc\u306e<code> sensor_id <\/code>\u3092\u53d6\u5f97\u3059\u308b\u306e\u3067\u3001\u305d\u306e\u30bb\u30f3\u30b5\u30fc\u306e\u6e2c\u5b9a\u5024\u3092\u4fdd\u5b58\u3059\u308b\u305f\u3081\u306e<code> Timeseries <\/code>\u30b3\u30f3\u30c6\u30ca\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002 <i> sensor-id <\/i>\u3067<b>\u8aad\u307f\u51fa\u3057<\/b>\u30c6\u30fc\u30d6\u30eb\u306e\u3059\u3079\u3066\u306e\u884c\u3092<code> SELECT <\/code>\u3057\u307e\u3059\u3002<a title=\"Timeseries containers in GridDB\" href=\"https:\/\/griddb.net\/ja\/docs\/documents\/3-2_key-container-model.php#sec-1.2\">timeseries<\/a>\u306f<b>row-keys<\/b>\u3068\u3057\u3066\u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7\u3092\u6301\u3063\u3066\u3044\u308b\u305f\u3081\u3001PostgreSQL\u304b\u3089\u53d6\u5f97\u3057\u305f\u884c\u3092<code> TIMESTAMP <\/code>\u5217\u3067\u4e26\u3079\u66ff\u3048\u307e\u3059\u3002<\/p>\n<p>\u3059\u3079\u3066\u306e<i>\u904e\u53bb<\/i>\u30c6\u30fc\u30d6\u30eb\u306e\u3059\u3079\u3066\u306e\u884c\u306b\u5bfe\u3057\u3066\u3001\u540c\u3058\u624b\u9806\u3067\u3059\u3079\u3066\u306e\u5217\u306e\u5024\u3092\u53d6\u5f97\u3057\u3001GridDB\u884c\u306e<i>\u884c\u30d5\u30a3\u30fc\u30eb\u30c9<\/i>\u3068\u3057\u3066\u8a2d\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<p>PostgreSQL\u306e<code> TIMESTAMP <\/code>\u3001<code> DATE <\/code>\u3001<code>TIME<\/code>\u306e\u5217\u306e\u5024\u306f\u3001Python\u3067\u306f<code> datetime <\/code>\u306e\u5024\u3068\u3057\u3066\u8fd4\u3063\u3066\u304f\u308b\u3053\u3068\u306b\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002 GridDB\u306e<b>\u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7<\/b>\u306e\u5217\u307e\u305f\u306f\u884c\u30d5\u30a3\u30fc\u30eb\u30c9\u306f\u3001<i>\u6570\u5024<\/i>\u5f62\u5f0f\u3067\u306e\u307f\u8a2d\u5b9a\u3067\u304d\u308b\u305f\u3081\u3001<i> datetime <\/i>\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7\u756a\u53f7\u306b\u5909\u63db\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u5909\u63db\u3057\u305f\u5f8c\u306b\u3001\u3059\u3079\u3066\u306e<i>\u884c\u30d5\u30a3\u30fc\u30eb\u30c9<\/i>\u3092\u8a2d\u5b9a\u3057\u3001GridDB\u306e\u305d\u306e\u30bb\u30f3\u30b5\u30fc\u306e<b> Timeseries <\/b>\u30b3\u30f3\u30c6\u30ca\u306b\u884c\u3092\u633f\u5165\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"prettyprint\">griddb = griddb_python_client\n\ndef datetime_to_timestamp(dt):\n        ## GridDB Timestamp Format: (All fields must be numerics)\n        ## $YEAR-$MONTH-$DAYT$HOUR:$MINUTE:$SECONDZ\n        time_string = dt.strftime(\"%Y-%m-%dT%XZ\") # '%X' means get timestamp value from 'datetime'\n        timestamp = griddb.Timestamp_parse(time_string)\n        return timestamp\n\n## (snip)\n## Migrate data from 'readings' table from PostgreSQL into Timeseries containers in GridDB\n\nsensor_id = \"sensor_1\" ## Example of a sensor id in a PV Site's facility\nquery = \"SELECT ts,value,status FROM sensors WHERE sensor_id = '%s' ORDER BY ts ASC\" % (sensor_id)\n\ncursor = connection.cursor()\ncursor.execute(query)\nrow = cursor.fetchone()\n\n## Obtain column values from each reading row (sensor measurement) from 'readings table\nwhile row is not None:\n        date, value, status = row\n        \n        reading = timeseries.create_row()\n        timestamp = datetime_to_timestamp(date)\n \n        reading.set_field_by_timestamp(0,timestamp)\n        reading.set_field_by_double(1,value)\n        reading.set_field_by_string(2,status)\n\n        ret = timeseries.put_row(reading)\n<\/pre>\n<h4 id=\"migrate-alerts\">\u30a2\u30e9\u30fc\u30c8\u30c6\u30fc\u30d6\u30eb\u306e\u79fb\u884c<\/h4>\n<p>PostgreSQL\u30c6\u30fc\u30d6\u30eb\u306e<code>\u30a2\u30e9\u30fc\u30c8<\/code>\u30c6\u30fc\u30d6\u30eb\u306f\u3001GridDB\u306e<b> 1\u30b3\u30ec\u30af\u30b7\u30e7\u30f3\u30b3\u30f3\u30c6\u30ca<\/b>\u306b\u306e\u307f\u30de\u30c3\u30d7\u3055\u308c\u307e\u3059\u3002 \u305d\u306e\u305f\u3081\u3001\u79fb\u884c\u306e\u624b\u9806\u306f<b>\u65bd\u8a2d<\/b>\u30c6\u30fc\u30d6\u30eb\u306e\u79fb\u884c\u306e\u624b\u9806\u306b\u4f3c\u3066\u3044\u307e\u3059\u3002<\/p>\n<pre class=\"prettyprint\">query = \"SELECT * FROM alerts\"\ncursor = connection.cursor()\n\ncursor.execute(query)\nrow = cursor.fetchone()\n\nwhile row is not None:\n        alert_id, date, facility_id, sensor_id, level, detail = row\n        \n        alert_notification = alerts_col.create_row()\n        timestamp = datetime_to_timestamp(date) \n\n        alert_notification.set_field_by_integer(0,alert_id)\n        alert_notification.set_field_by_timestamp(1,timestamp)\n        alert_notification.set_field_by_string(2,facility_id)\n        alert_notification.set_field_by_string(3,sensor_id)\n        alert_notification.set_field_integer(4,level)\n        alert_notification.set_field_by_string(5,detail)\n\n        ret = alerts_col.put_row(alert_notification)\n<\/pre>\n<h2 id=\"conclusion\">\u307e\u3068\u3081<\/h2>\n<p>\u3053\u308c\u3067<b> 4\u3064\u306ePostgreSQL\u30c6\u30fc\u30d6\u30eb<\/b>\u304c\u3059\u3079\u3066\u79fb\u884c\u3055\u308c\u3001GridDB\u3078\u306e\u79fb\u884c\u306f\u5b8c\u4e86\u3057\u307e\u3057\u305f\u3002 \u3053\u306e\u5f8c\u306f\u3059\u3079\u3066\u306ePostgreSQL\u30c7\u30fc\u30bf\u3092\u524a\u9664\u3057\u3001GridDB\u306e\u512a\u308c\u305f\u8a2d\u8a08\u3068\u6027\u80fd\u306e\u30e1\u30ea\u30c3\u30c8\u3092\u5b9f\u611f\u3057\u3066\u3044\u305f\u3060\u3051\u308b\u3067\u3057\u3087\u3046\u3002 GridDB\u30b3\u30f3\u30c6\u30ca\u3067\u306f\u3001<a href=\"https:\/\/griddb.net\/ja\/blog\/griddb-complies-acid\/\"> ACID\u6e96\u62e0<\/a>\u306e\u3088\u3046\u306aSQL\u306e\u7279\u6027\u304c\u5f97\u3089\u308c\u308b\u3068\u540c\u6642\u306b\u3001\u67d4\u8edf\u6027\u3084 \u9ad8\u3044<a href=\"https:\/\/griddb.net\/ja\/blog\/your-database-is-really-scalable\/\">\u30b9\u30b1\u30fc\u30e9\u30d3\u30ea\u30c6\u30a3<\/a>\u3068\u3044\u3063\u305fNoSQL\u306e\u5229\u70b9\u3082\u5f97\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u30ea\u30ec\u30fc\u30b7\u30e7\u30ca\u30eb\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u304b\u3089GridDB\u3078\u306e\u79fb\u884c\u3092\u30b7\u30fc\u30e0\u30ec\u30b9\u306b\u884c\u3046\u305f\u3081\u306b\u306f\u3001\u9069\u5207\u306a\u8a2d\u8a08\u3068\u9069\u5207\u306a\u30c7\u30fc\u30bf\u30e2\u30c7\u30ea\u30f3\u30b0\u3092\u884c\u3046\u3053\u3068\u304c\u91cd\u8981\u3067\u3059\u3002<\/p>\n<h3 id=\"reference\">\u53c2\u7167<\/h3>\n<ul id=\"reference-points\" style=\"padding-left: 36px;\">\n<li>PostgreSQL \u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306f<a href=\"https:\/\/www.postgresql.org\/docs\/9.2\/static\/release-9-2-23.html\">PostgreSQL Version 9.2.23<\/a> \u3092\u4f7f\u7528\u3057\u307e\u3057\u305f\u3002<\/li>\n<li>GridDB\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306f<b>GridDB<\/b> <a title=\"Download GridDB CE\" href=\"https:\/\/github.com\/griddb\/griddb_nosql\/releases\/download\/v3.0.1\/griddb_nosql-3.0.1-1.linux.x86_64.rpm\">Community Edition 3.0.1<\/a>\u3092\u4f7f\u7528\u3057\u307e\u3057\u305f\u3002<\/li>\n<li><b>CentOS 7.3<\/b> Linux Operating System\u4e0a\u3067\u306e\u79fb\u884c\u306e\u305f\u3081\u306e\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u8a00\u8a9e\u3068\u3057\u3066<a title=\"Download Python\" href=\"https:\/\/www.python.org\/download\/releases\/2.7.3\/\">Python version 2.7.13<\/a> \u3092\u4f7f\u7528\u3057\u307e\u3057\u305f\u3002<\/li>\n<li>Python\u3092\u4f7f\u3063\u305fGridDB\u306b\u3064\u3044\u3066\u8a73\u3057\u304f\u77e5\u308a\u305f\u3044\u65b9\u306f\u3001<a title=\"Python API tutorial\" href=\"https:\/\/griddb.net\/ja\/blog\/using-griddbs-cpythonruby-apis\/\">API post<\/a>\u3092\u3054\u53c2\u7167\u304f\u3060\u3055\u3044\u3002<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u306f\u3058\u3081\u306b \u4ee5\u524d\u306e\u30d6\u30ed\u30b0\u3067\u3001Java\u3092\u4f7f\u7528\u3057\u3066\u30ea\u30ec\u30fc\u30b7\u30e7\u30ca\u30eb\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9MySQL\u3092\u79fb\u884c\u3059\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u3054\u7d39\u4ecb\u3057\u307e\u3057\u305f\u3002 \u3053\u306e\u30d6\u30ed\u30b0\u3067\u306f\u3001PostgreSQL database\u3092Python\u3092\u4f7f\u3063\u3066GridDB\u3078\u79fb\u884c\u3059\u308b\u65b9 [&hellip;]<\/p>\n","protected":false},"author":123,"featured_media":49055,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1005],"tags":[],"class_list":["post-50675","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\u304b\u3089GridDB\u3078\u306e\u79fb\u884c | GridDB: Open Source Time Series Database for IoT<\/title>\n<meta name=\"description\" content=\"\u306f\u3058\u3081\u306b \u4ee5\u524d\u306e\u30d6\u30ed\u30b0\u3067\u3001Java\u3092\u4f7f\u7528\u3057\u3066\u30ea\u30ec\u30fc\u30b7\u30e7\u30ca\u30eb\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9MySQL\u3092\u79fb\u884c\u3059\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u3054\u7d39\u4ecb\u3057\u307e\u3057\u305f\u3002 \u3053\u306e\u30d6\u30ed\u30b0\u3067\u306f\u3001PostgreSQL\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.griddb.net\/ja\/\u672a\u5206\u985e\/migrating-from-postgresql-to-griddb\/\" \/>\n<meta property=\"og:locale\" content=\"ja_JP\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"PostgreSQL\u304b\u3089GridDB\u3078\u306e\u79fb\u884c | GridDB: Open Source Time Series Database for IoT\" \/>\n<meta property=\"og:description\" content=\"\u306f\u3058\u3081\u306b \u4ee5\u524d\u306e\u30d6\u30ed\u30b0\u3067\u3001Java\u3092\u4f7f\u7528\u3057\u3066\u30ea\u30ec\u30fc\u30b7\u30e7\u30ca\u30eb\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9MySQL\u3092\u79fb\u884c\u3059\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u3054\u7d39\u4ecb\u3057\u307e\u3057\u305f\u3002 \u3053\u306e\u30d6\u30ed\u30b0\u3067\u306f\u3001PostgreSQL\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.griddb.net\/ja\/\u672a\u5206\u985e\/migrating-from-postgresql-to-griddb\/\" \/>\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-03-27T07:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-11-14T15:53:40+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/wp-content\/uploads\/2018\/06\/blog_title_24.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=\"4\u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/migrating-from-postgresql-to-griddb\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/migrating-from-postgresql-to-griddb\/\"},\"author\":{\"name\":\"Joshua Pascascio\",\"@id\":\"https:\/\/griddb.net\/en\/#\/schema\/person\/ca72185e9a3778df765a76313f789fd8\"},\"headline\":\"PostgreSQL\u304b\u3089GridDB\u3078\u306e\u79fb\u884c\",\"datePublished\":\"2018-03-27T07:00:00+00:00\",\"dateModified\":\"2025-11-14T15:53:40+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/migrating-from-postgresql-to-griddb\/\"},\"wordCount\":210,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/griddb.net\/en\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/migrating-from-postgresql-to-griddb\/#primaryimage\"},\"thumbnailUrl\":\"\/wp-content\/uploads\/2018\/06\/blog_title_24.png\",\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/migrating-from-postgresql-to-griddb\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/migrating-from-postgresql-to-griddb\/\",\"url\":\"https:\/\/www.griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/migrating-from-postgresql-to-griddb\/\",\"name\":\"PostgreSQL\u304b\u3089GridDB\u3078\u306e\u79fb\u884c | GridDB: Open Source Time Series Database for IoT\",\"isPartOf\":{\"@id\":\"https:\/\/griddb.net\/en\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/migrating-from-postgresql-to-griddb\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/migrating-from-postgresql-to-griddb\/#primaryimage\"},\"thumbnailUrl\":\"\/wp-content\/uploads\/2018\/06\/blog_title_24.png\",\"datePublished\":\"2018-03-27T07:00:00+00:00\",\"dateModified\":\"2025-11-14T15:53:40+00:00\",\"description\":\"\u306f\u3058\u3081\u306b \u4ee5\u524d\u306e\u30d6\u30ed\u30b0\u3067\u3001Java\u3092\u4f7f\u7528\u3057\u3066\u30ea\u30ec\u30fc\u30b7\u30e7\u30ca\u30eb\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9MySQL\u3092\u79fb\u884c\u3059\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u3054\u7d39\u4ecb\u3057\u307e\u3057\u305f\u3002 \u3053\u306e\u30d6\u30ed\u30b0\u3067\u306f\u3001PostgreSQL\",\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/migrating-from-postgresql-to-griddb\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/www.griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/migrating-from-postgresql-to-griddb\/#primaryimage\",\"url\":\"\/wp-content\/uploads\/2018\/06\/blog_title_24.png\",\"contentUrl\":\"\/wp-content\/uploads\/2018\/06\/blog_title_24.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\u304b\u3089GridDB\u3078\u306e\u79fb\u884c | GridDB: Open Source Time Series Database for IoT","description":"\u306f\u3058\u3081\u306b \u4ee5\u524d\u306e\u30d6\u30ed\u30b0\u3067\u3001Java\u3092\u4f7f\u7528\u3057\u3066\u30ea\u30ec\u30fc\u30b7\u30e7\u30ca\u30eb\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9MySQL\u3092\u79fb\u884c\u3059\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u3054\u7d39\u4ecb\u3057\u307e\u3057\u305f\u3002 \u3053\u306e\u30d6\u30ed\u30b0\u3067\u306f\u3001PostgreSQL","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:\/\/www.griddb.net\/ja\/\u672a\u5206\u985e\/migrating-from-postgresql-to-griddb\/","og_locale":"ja_JP","og_type":"article","og_title":"PostgreSQL\u304b\u3089GridDB\u3078\u306e\u79fb\u884c | GridDB: Open Source Time Series Database for IoT","og_description":"\u306f\u3058\u3081\u306b \u4ee5\u524d\u306e\u30d6\u30ed\u30b0\u3067\u3001Java\u3092\u4f7f\u7528\u3057\u3066\u30ea\u30ec\u30fc\u30b7\u30e7\u30ca\u30eb\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9MySQL\u3092\u79fb\u884c\u3059\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u3054\u7d39\u4ecb\u3057\u307e\u3057\u305f\u3002 \u3053\u306e\u30d6\u30ed\u30b0\u3067\u306f\u3001PostgreSQL","og_url":"https:\/\/www.griddb.net\/ja\/\u672a\u5206\u985e\/migrating-from-postgresql-to-griddb\/","og_site_name":"GridDB: Open Source Time Series Database for IoT","article_publisher":"https:\/\/www.facebook.com\/griddbcommunity\/","article_published_time":"2018-03-27T07:00:00+00:00","article_modified_time":"2025-11-14T15:53:40+00:00","og_image":[{"width":870,"height":490,"url":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/wp-content\/uploads\/2018\/06\/blog_title_24.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":"4\u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/migrating-from-postgresql-to-griddb\/#article","isPartOf":{"@id":"https:\/\/www.griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/migrating-from-postgresql-to-griddb\/"},"author":{"name":"Joshua Pascascio","@id":"https:\/\/griddb.net\/en\/#\/schema\/person\/ca72185e9a3778df765a76313f789fd8"},"headline":"PostgreSQL\u304b\u3089GridDB\u3078\u306e\u79fb\u884c","datePublished":"2018-03-27T07:00:00+00:00","dateModified":"2025-11-14T15:53:40+00:00","mainEntityOfPage":{"@id":"https:\/\/www.griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/migrating-from-postgresql-to-griddb\/"},"wordCount":210,"commentCount":0,"publisher":{"@id":"https:\/\/griddb.net\/en\/#organization"},"image":{"@id":"https:\/\/www.griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/migrating-from-postgresql-to-griddb\/#primaryimage"},"thumbnailUrl":"\/wp-content\/uploads\/2018\/06\/blog_title_24.png","inLanguage":"ja","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/migrating-from-postgresql-to-griddb\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/migrating-from-postgresql-to-griddb\/","url":"https:\/\/www.griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/migrating-from-postgresql-to-griddb\/","name":"PostgreSQL\u304b\u3089GridDB\u3078\u306e\u79fb\u884c | GridDB: Open Source Time Series Database for IoT","isPartOf":{"@id":"https:\/\/griddb.net\/en\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/migrating-from-postgresql-to-griddb\/#primaryimage"},"image":{"@id":"https:\/\/www.griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/migrating-from-postgresql-to-griddb\/#primaryimage"},"thumbnailUrl":"\/wp-content\/uploads\/2018\/06\/blog_title_24.png","datePublished":"2018-03-27T07:00:00+00:00","dateModified":"2025-11-14T15:53:40+00:00","description":"\u306f\u3058\u3081\u306b \u4ee5\u524d\u306e\u30d6\u30ed\u30b0\u3067\u3001Java\u3092\u4f7f\u7528\u3057\u3066\u30ea\u30ec\u30fc\u30b7\u30e7\u30ca\u30eb\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9MySQL\u3092\u79fb\u884c\u3059\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u3054\u7d39\u4ecb\u3057\u307e\u3057\u305f\u3002 \u3053\u306e\u30d6\u30ed\u30b0\u3067\u306f\u3001PostgreSQL","inLanguage":"ja","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/migrating-from-postgresql-to-griddb\/"]}]},{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/migrating-from-postgresql-to-griddb\/#primaryimage","url":"\/wp-content\/uploads\/2018\/06\/blog_title_24.png","contentUrl":"\/wp-content\/uploads\/2018\/06\/blog_title_24.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\/50675","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=50675"}],"version-history":[{"count":1,"href":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/ja\/wp-json\/wp\/v2\/posts\/50675\/revisions"}],"predecessor-version":[{"id":51518,"href":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/ja\/wp-json\/wp\/v2\/posts\/50675\/revisions\/51518"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/ja\/wp-json\/wp\/v2\/media\/49055"}],"wp:attachment":[{"href":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/ja\/wp-json\/wp\/v2\/media?parent=50675"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/ja\/wp-json\/wp\/v2\/categories?post=50675"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/ja\/wp-json\/wp\/v2\/tags?post=50675"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}