{"id":398,"date":"2012-03-07T22:31:19","date_gmt":"2012-03-07T13:31:19","guid":{"rendered":"http:\/\/153.126.194.20\/?p=398"},"modified":"2024-11-17T15:23:01","modified_gmt":"2024-11-17T06:23:01","slug":"ubuntu-memo-postgresql","status":"publish","type":"post","link":"https:\/\/funaori.com\/ja\/2012\/03\/07\/ubuntu-memo-postgresql\/","title":{"rendered":"ubuntu\/memo\/postgreSQL"},"content":{"rendered":"<h2 id=\"content_1_0\">PostgreSQL\u95a2\u9023\u30e1\u30e2  <a class=\"anchor_super\" id=\"ed375fe6\" href=\"http:\/\/192.168.1.4\/www_old\/linux\/index.php?ubuntu%2Fmemo%2FpostgreSQL#ed375fe6\" title=\"ed375fe6\">\u2020<\/a><\/h2>\n<div class=\"jumpmenu\"><a href=\"#navigator\">\u2191<\/a><\/div>\n<h3 id=\"content_1_1\">PostgreSQL\u30e1\u30e2  <a class=\"anchor_super\" id=\"s73f3421\" href=\"http:\/\/192.168.1.4\/www_old\/linux\/index.php?ubuntu%2Fmemo%2FpostgreSQL#s73f3421\" title=\"s73f3421\">\u2020<\/a><\/h3>\n<div class=\"jumpmenu\"><a href=\"#navigator\">\u2191<\/a><\/div>\n<h4 id=\"content_1_2\">\u30e6\u30fc\u30b6\u306e\u65b0\u898f\u4f5c\u6210  <a class=\"anchor_super\" id=\"t4e7b36b\" href=\"http:\/\/192.168.1.4\/www_old\/linux\/index.php?ubuntu%2Fmemo%2FpostgreSQL#t4e7b36b\" title=\"t4e7b36b\">\u2020<\/a><\/h4>\n<pre>$ creageuser user_name<\/pre>\n<div class=\"jumpmenu\"><a href=\"#navigator\">\u2191<\/a><\/div>\n<h4 id=\"content_1_3\">\u65e2\u5b58\u30e6\u30fc\u30b6\u306e\u30d1\u30b9\u30ef\u30fc\u30c9\u5909\u66f4  <a class=\"anchor_super\" id=\"k8c5ae37\" href=\"http:\/\/192.168.1.4\/www_old\/linux\/index.php?ubuntu%2Fmemo%2FpostgreSQL#k8c5ae37\" title=\"k8c5ae37\">\u2020<\/a><\/h4>\n<pre>postgres=# alter user user_name with password 'password';\r\npostgres=# \\q<\/pre>\n<div class=\"jumpmenu\"><a href=\"#navigator\">\u2191<\/a><\/div>\n<h4 id=\"content_1_4\">\u65e2\u5b58\u30e6\u30fc\u30b6\u306b\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3068\u30e6\u30fc\u30b6\u306e\u4f5c\u6210\u6a29\u9650\u3092\u3042\u305f\u3048\u308b  <a class=\"anchor_super\" id=\"v76c418d\" href=\"http:\/\/192.168.1.4\/www_old\/linux\/index.php?ubuntu%2Fmemo%2FpostgreSQL#v76c418d\" title=\"v76c418d\">\u2020<\/a><\/h4>\n<pre>postgres=# alter user user_name CREATEUSER CREATEDB;<\/pre>\n<div class=\"jumpmenu\"><a href=\"#navigator\">\u2191<\/a><\/div>\n<h4 id=\"content_1_5\">\u30c6\u30fc\u30d6\u30eb\u306e\u4f5c\u6210  <a class=\"anchor_super\" id=\"t8f28fcc\" href=\"http:\/\/192.168.1.4\/www_old\/linux\/index.php?ubuntu%2Fmemo%2FpostgreSQL#t8f28fcc\" title=\"t8f28fcc\">\u2020<\/a><\/h4>\n<pre>portfolio=# CREATE table table_name(date timestamp, rate numeric);<\/pre>\n<div class=\"jumpmenu\"><a href=\"#navigator\">\u2191<\/a><\/div>\n<h4 id=\"content_1_6\">\u30c6\u30fc\u30d6\u30eb\u306e\u5185\u5bb9\u78ba\u8a8d  <a class=\"anchor_super\" id=\"l32e1681\" href=\"http:\/\/192.168.1.4\/www_old\/linux\/index.php?ubuntu%2Fmemo%2FpostgreSQL#l32e1681\" title=\"l32e1681\">\u2020<\/a><\/h4>\n<pre>portfolio=# \\d table_name<\/pre>\n<div class=\"jumpmenu\"><a href=\"#navigator\">\u2191<\/a><\/div>\n<h4 id=\"content_1_7\">\u30c6\u30fc\u30d6\u30eb\u306e\u5185\u5bb9\u3092\u30a8\u30af\u30b9\u30dd\u30fc\u30c8\u30fb\u30a4\u30f3\u30dd\u30fc\u30c8  <a class=\"anchor_super\" id=\"w08fca26\" href=\"http:\/\/192.168.1.4\/www_old\/linux\/index.php?ubuntu%2Fmemo%2FpostgreSQL#w08fca26\" title=\"w08fca26\">\u2020<\/a><\/h4>\n<ul class=\"list1\" style=\"padding-left:16px;margin-left:16px\">\n<li>\u30a8\u30af\u30b9\u30dd\u30fc\u30c8\n<pre>portfolio=&gt; copy aud2jp to '\/tmp\/aud2jp';<\/pre>\n<\/li>\n<li>\u30a4\u30f3\u30dd\u30fc\u30c8\n<pre>portfolio=&gt; copy aud2jp from '\/tmp\/aud2jp';<\/pre>\n<\/li>\n<\/ul>\n<div class=\"jumpmenu\"><a href=\"#navigator\">\u2191<\/a><\/div>\n<h4 id=\"content_1_8\">Apache\u304b\u3089\u306e\u63a5\u7d9a  <a class=\"anchor_super\" id=\"v42b93d9\" href=\"http:\/\/192.168.1.4\/www_old\/linux\/index.php?ubuntu%2Fmemo%2FpostgreSQL#v42b93d9\" title=\"v42b93d9\">\u2020<\/a><\/h4>\n<ul class=\"list1\" style=\"padding-left:16px;margin-left:16px\">\n<li>apache\u30e6\u30fc\u30b6\u306e\u4f5c\u6210\n<pre>$ createuser apache<\/pre>\n<\/li>\n<li>\u30c6\u30fc\u30d6\u30eb\u306e\u30a2\u30af\u30bb\u30b9\u6a29\u9650\u3092\u3042\u305f\u3048\u308b\n<pre>$ psql -n SampleDB\r\nSampleDB=&gt; grant select on SampleTable to apache;<\/pre>\n<\/li>\n<\/ul>\n<div class=\"jumpmenu\"><a href=\"#navigator\">\u2191<\/a><\/div>\n<h4 id=\"content_1_9\">\u30c6\u30fc\u30d6\u30eb\u524a\u9664  <a class=\"anchor_super\" id=\"n2e22b99\" href=\"http:\/\/192.168.1.4\/www_old\/linux\/index.php?ubuntu%2Fmemo%2FpostgreSQL#n2e22b99\" title=\"n2e22b99\">\u2020<\/a><\/h4>\n<pre>SampleDB=&gt; drop table tablename;<\/pre>\n<div class=\"jumpmenu\"><a href=\"#navigator\">\u2191<\/a><\/div>\n<h4 id=\"content_1_10\">\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u524a\u9664  <a class=\"anchor_super\" id=\"r57bcd5f\" href=\"http:\/\/192.168.1.4\/www_old\/linux\/index.php?ubuntu%2Fmemo%2FpostgreSQL#r57bcd5f\" title=\"r57bcd5f\">\u2020<\/a><\/h4>\n<pre>$ dropdb db_name<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>PostgreSQL\u95a2\u9023\u30e1\u30e2 \u2020 \u2191 PostgreSQL\u30e1\u30e2 \u2020 \u2191 \u30e6\u30fc\u30b6\u306e\u65b0\u898f\u4f5c\u6210 \u2020 $ creageuser user_name \u2191 \u65e2\u5b58\u30e6\u30fc\u30b6\u306e\u30d1\u30b9\u30ef\u30fc\u30c9\u5909\u66f4 \u2020 postgres=# alter user &hellip; <a class=\"more-link\" href=\"https:\/\/funaori.com\/ja\/2012\/03\/07\/ubuntu-memo-postgresql\/\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"screen-reader-text\">ubuntu\/memo\/postgreSQL<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_locale":"ja","_original_post":"398","footnotes":""},"categories":[14],"tags":[],"class_list":["post-398","post","type-post","status-publish","format-standard","hentry","category-ubuntu","ja","entry"],"_links":{"self":[{"href":"https:\/\/funaori.com\/wp-json\/wp\/v2\/posts\/398","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/funaori.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/funaori.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/funaori.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/funaori.com\/wp-json\/wp\/v2\/comments?post=398"}],"version-history":[{"count":1,"href":"https:\/\/funaori.com\/wp-json\/wp\/v2\/posts\/398\/revisions"}],"predecessor-version":[{"id":399,"href":"https:\/\/funaori.com\/wp-json\/wp\/v2\/posts\/398\/revisions\/399"}],"wp:attachment":[{"href":"https:\/\/funaori.com\/wp-json\/wp\/v2\/media?parent=398"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/funaori.com\/wp-json\/wp\/v2\/categories?post=398"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/funaori.com\/wp-json\/wp\/v2\/tags?post=398"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}