{"id":11369,"date":"2023-05-10T07:26:47","date_gmt":"2023-05-09T22:26:47","guid":{"rendered":"https:\/\/lab4ict.com\/system\/?p=11369"},"modified":"2023-07-14T21:02:53","modified_gmt":"2023-07-14T12:02:53","slug":"postgresql%e3%81%a7db%e3%81%ae%e4%bd%9c%e6%88%90%e3%81%a8%e5%89%8a%e9%99%a4%e3%82%92%e8%a1%8c%e3%81%86%ef%bc%81","status":"publish","type":"post","link":"https:\/\/lab4ict.com\/system\/archives\/11369","title":{"rendered":"PostgreSQL\u3067DB\u306e\u4f5c\u6210\u3068\u524a\u9664\u3092\u884c\u3046\uff01"},"content":{"rendered":"<p>PostgreSQL\u3067DB\u306e\u4f5c\u6210\u3068\u524a\u9664\u3092\u884c\u3044\u307e\u3059\u3002<br \/>\n<!--more--><\/p>\n<h2>DB\u3092\u4f5c\u6210\u3059\u308b\uff01<\/h2>\n<p>inventory\u3068\u3044\u3046DB\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1,3,7]; title: ; notranslate\" title=\"\">\r\npostgres=# create database inventory;\r\nCREATE DATABASE\r\npostgres=# \\l\r\n                                  List of databases\r\n   Name    |  Owner   | Encoding |   Collate   |    Ctype    |   Access privileges   \r\n-----------+----------+----------+-------------+-------------+-----------------------\r\n inventory | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | \r\n postgres  | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | \r\n template0 | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c\/postgres          +\r\n           |          |          |             |             | postgres=CTc\/postgres\r\n template1 | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c\/postgres          +\r\n           |          |          |             |             | postgres=CTc\/postgres\r\n(4 rows)\r\n<\/pre>\n<h2>DB\u3092\u524a\u9664\u3059\u308b\uff01<\/h2>\n<p>\u4f5c\u6210\u3057\u305finventory\u3068\u3044\u3046DB\u3092\u524a\u9664\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1,3]; title: ; notranslate\" title=\"\">\r\n# drop database inventory;\r\nDROP DATABASE\r\npostgres=# \\l\r\n                                  List of databases\r\n   Name    |  Owner   | Encoding |   Collate   |    Ctype    |   Access privileges   \r\n-----------+----------+----------+-------------+-------------+-----------------------\r\n postgres  | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | \r\n template0 | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c\/postgres          +\r\n           |          |          |             |             | postgres=CTc\/postgres\r\n template1 | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c\/postgres          +\r\n           |          |          |             |             | postgres=CTc\/postgres\r\n(3 rows)\r\n<\/pre>\n<h2>\u304a\u308f\u308a\u306b<\/h2>\n<p>PostgreSQL\u3067DB\u306e\u4f5c\u6210\u3068\u524a\u9664\u306f\u3001\u300ccreate database\u300d\u3001\u300cdrop database\u300d\u30b3\u30de\u30f3\u30c9\u3067\u884c\u3044\u307e\u3059\u3002<\/p>\n<h2>\u53c2\u8003\u60c5\u5831<\/h2>\n<ul>\n<li><a href=\"https:\/\/www.postgresql.org\/\" target=\"_blank\" rel=\"noopener\">PostgreSQL: The World's Most Advanced Open Source Relational Database<\/a><\/li>\n<\/ul>\n<h2>\u95a2\u9023\u8a18\u4e8b<\/h2>\n<div class=\"sc_getpost\"><a class=\"clearfix\" href=\"https:\/\/lab4ict.com\/system\/archives\/10238\" ><div class=\"sc_getpost_thumb post-box-thumbnail__wrap\"><img decoding=\"async\" src=\"data:image\/gif;base64,R0lGODdhAQABAPAAAN3d3QAAACwAAAAAAQABAAACAkQBADs=\" width=\"150\" height=\"150\" alt=\"\u3010\u8a18\u4e8b\u4e00\u89a7\u3011PostgreSQL\u3092\u4f7f\u3044\u3053\u306a\u3059\uff01\" loading=\"lazy\" data-src=\"https:\/\/lab4ict.com\/system\/wp-content\/uploads\/2023\/05\/eyecatch_postgresql_01-150x150.png\" class=\"lazyload\"><\/div><div class=\"title\">\u3010\u8a18\u4e8b\u4e00\u89a7\u3011PostgreSQL\u3092\u4f7f\u3044\u3053\u306a\u3059\uff01<\/div><div class=\"substr\">PostgreSQL\u3092\u4f7f\u3044\u3053\u306a\u3059\u305f\u3081\u306e\u8a18\u4e8b\u4e00\u89a7\u3092\u63b2\u8f09\u3057\u307e\u3059\u3002...<\/div><\/a><\/div>\n<h2>\u53c2\u8003\u66f8\u7c4d\uff08Amazon\uff09<\/h2>\n<p><iframe sandbox=\"allow-popups allow-scripts allow-modals allow-forms allow-same-origin\" style=\"width:120px;height:240px;\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\" frameborder=\"0\" src=\"\/\/rcm-fe.amazon-adsystem.com\/e\/cm?lt1=_blank&bc1=000000&IS2=1&bg1=FFFFFF&fc1=000000&lc1=0000FF&t=infotecr-22&language=ja_JP&o=9&p=8&l=as4&m=amazon&f=ifr&ref=as_ss_li_til&asins=B0BLY4SPC4&linkId=74585e7caebda2fa1613b0bd5bafb3cf\"><\/iframe><\/p>\n<hr \/>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>PostgreSQL\u3067DB\u306e\u4f5c\u6210\u3068\u524a\u9664\u3092\u884c\u3044\u307e\u3059\u3002<\/p>\n","protected":false},"author":1,"featured_media":11332,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[221],"tags":[522,289,630,673],"class_list":["post-11369","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-postgresql","tag-db","tag-postgresql","tag-630","tag-673"],"_links":{"self":[{"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/posts\/11369","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/comments?post=11369"}],"version-history":[{"count":3,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/posts\/11369\/revisions"}],"predecessor-version":[{"id":12888,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/posts\/11369\/revisions\/12888"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/media\/11332"}],"wp:attachment":[{"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/media?parent=11369"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/categories?post=11369"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/tags?post=11369"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}