{"id":2430,"date":"2022-12-30T21:30:30","date_gmt":"2022-12-30T12:30:30","guid":{"rendered":"https:\/\/www.agile-software.site\/?p=2430"},"modified":"2023-02-13T06:45:41","modified_gmt":"2023-02-12T21:45:41","slug":"2430","status":"publish","type":"post","link":"https:\/\/agile-software.net\/?p=2430","title":{"rendered":"pgAdmin\u30de\u30cb\u30e5\u30a2\u30eb"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">pgAdmin4<\/h2>\n\n\n\n<p>pgAdmin4\u306fPostgreSQL\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3084\u30e6\u30fc\u30b6\u30fc\u306a\u3069\u3092\u7ba1\u7406\u3059\u308b\u305f\u3081\u306eGUI\u30c4\u30fc\u30eb\u3067\u3059\u3002<br>\u30b9\u30bf\u30fc\u30c8\u30e1\u30cb\u30e5\u30fc\u304b\u3089\u300cPostgreSQL 15\u300d\u2192\u300cpgAdmin4\u300d\u3068\u9078\u629e\u3059\u308b\u3053\u3068\u3067pgAdmin4\u3092\u8d77\u52d5\u3067\u304d\u307e\u3059\u3002<br>pgAdmin4\u3067\u30b5\u30fc\u30d0\u30fc\u3092\u7ba1\u7406\u3059\u308b\u306b\u306f\u7ba1\u7406\u5bfe\u8c61\u3068\u306a\u308bPostgreSQL\u30b5\u30fc\u30d0\u30fc\u3078\u63a5\u7d9a\u3059\u308b\u305f\u3081\u306e\u8a2d\u5b9a\u3092\u884c\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u300cServers\u300d\u3092\u53f3\u30af\u30ea\u30c3\u30af\u3057\u3001\u8868\u793a\u3055\u308c\u305f\u30e1\u30cb\u30e5\u30fc\u304b\u3089\u300c\u4f5c\u6210\u300d\u2192\u300c\u30b5\u30fc\u30d0\u30fc\u300d\u3092\u9078\u629e\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u65e5\u672c\u8a9e\u5316<\/h2>\n\n\n\n<p>\u300cFile \u300d \u2192 \u300c Preferences \u300d \u3092\u9078\u629e\u3059\u308b\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"850\" src=\"https:\/\/www.agile-software.site\/wp-content\/uploads\/2022\/12\/2022-12-30_11-1024x850.png\" alt=\"\" class=\"wp-image-2432\" srcset=\"https:\/\/agile-software.net\/wp-content\/uploads\/2022\/12\/2022-12-30_11-1024x850.png 1024w, https:\/\/agile-software.net\/wp-content\/uploads\/2022\/12\/2022-12-30_11-300x249.png 300w, https:\/\/agile-software.net\/wp-content\/uploads\/2022\/12\/2022-12-30_11-768x637.png 768w, https:\/\/agile-software.net\/wp-content\/uploads\/2022\/12\/2022-12-30_11.png 1058w, https:\/\/www.agile-software.site\/wp-content\/uploads\/2022\/12\/2022-12-30_11-1024x850.png 856w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>&nbsp;\u300c Miscellaneous \u300d \u2192\u300c User language \u300d \u3092\u9078\u629e\u3059\u308b\u3002<br>English\u306b\u306a\u3063\u3066\u3044\u308b\u306e\u3092Japanese\u306b\u5909\u66f4\u3057\u3066Save\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"850\" src=\"https:\/\/www.agile-software.site\/wp-content\/uploads\/2022\/12\/2022-12-30_13-1024x850.png\" alt=\"\" class=\"wp-image-2433\" srcset=\"https:\/\/agile-software.net\/wp-content\/uploads\/2022\/12\/2022-12-30_13-1024x850.png 1024w, https:\/\/agile-software.net\/wp-content\/uploads\/2022\/12\/2022-12-30_13-300x249.png 300w, https:\/\/agile-software.net\/wp-content\/uploads\/2022\/12\/2022-12-30_13-768x637.png 768w, https:\/\/agile-software.net\/wp-content\/uploads\/2022\/12\/2022-12-30_13.png 1058w, https:\/\/www.agile-software.site\/wp-content\/uploads\/2022\/12\/2022-12-30_13-1024x850.png 856w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">\u30b5\u30fc\u30d0\u30fc\u4f5c\u6210<\/h2>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"850\" src=\"https:\/\/www.agile-software.site\/wp-content\/uploads\/2022\/12\/2022-12-30_14-1024x850.png\" alt=\"\" class=\"wp-image-2434\" srcset=\"https:\/\/agile-software.net\/wp-content\/uploads\/2022\/12\/2022-12-30_14-1024x850.png 1024w, https:\/\/agile-software.net\/wp-content\/uploads\/2022\/12\/2022-12-30_14-300x249.png 300w, https:\/\/agile-software.net\/wp-content\/uploads\/2022\/12\/2022-12-30_14-768x637.png 768w, https:\/\/agile-software.net\/wp-content\/uploads\/2022\/12\/2022-12-30_14.png 1058w, https:\/\/www.agile-software.site\/wp-content\/uploads\/2022\/12\/2022-12-30_14-1024x850.png 856w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u30db\u30b9\u30c8\u540d<\/strong><\/li>\n<\/ul>\n\n\n\n<p>PostgreSQL\u30b5\u30fc\u30d0\u30fc\u304c\u52d5\u3044\u3066\u3044\u308b\u30de\u30b7\u30f3\u306e\u30db\u30b9\u30c8\u540d\u307e\u305f\u306fIP\u30a2\u30c9\u30ec\u30b9\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"850\" src=\"https:\/\/www.agile-software.site\/wp-content\/uploads\/2022\/12\/2022-12-30_15-1024x850.png\" alt=\"\" class=\"wp-image-2435\" srcset=\"https:\/\/agile-software.net\/wp-content\/uploads\/2022\/12\/2022-12-30_15-1024x850.png 1024w, https:\/\/agile-software.net\/wp-content\/uploads\/2022\/12\/2022-12-30_15-300x249.png 300w, https:\/\/agile-software.net\/wp-content\/uploads\/2022\/12\/2022-12-30_15-768x637.png 768w, https:\/\/agile-software.net\/wp-content\/uploads\/2022\/12\/2022-12-30_15.png 1058w, https:\/\/www.agile-software.site\/wp-content\/uploads\/2022\/12\/2022-12-30_15-1024x850.png 856w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u4f5c\u6210<\/h2>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"850\" src=\"https:\/\/www.agile-software.site\/wp-content\/uploads\/2022\/12\/2022-12-30_16-1024x850.png\" alt=\"\" class=\"wp-image-2436\" srcset=\"https:\/\/agile-software.net\/wp-content\/uploads\/2022\/12\/2022-12-30_16-1024x850.png 1024w, https:\/\/agile-software.net\/wp-content\/uploads\/2022\/12\/2022-12-30_16-300x249.png 300w, https:\/\/agile-software.net\/wp-content\/uploads\/2022\/12\/2022-12-30_16-768x637.png 768w, https:\/\/agile-software.net\/wp-content\/uploads\/2022\/12\/2022-12-30_16.png 1058w, https:\/\/www.agile-software.site\/wp-content\/uploads\/2022\/12\/2022-12-30_16-1024x850.png 856w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9<\/td><td>pgadmin<\/td><\/tr><tr><td>\u6240\u6709\u8005<\/td><td>postgres<\/td><\/tr><tr><td>\u30a8\u30f3\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0<\/td><td>UTF8<\/td><\/tr><tr><td>\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8<\/td><td>\u6307\u5b9a\u3057\u306a\u3044<\/td><\/tr><tr><td>\u30c6\u30fc\u30d6\u30eb\u7a7a\u9593<\/td><td>\u6307\u5b9a\u3057\u306a\u3044<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">\u30c6\u30fc\u30d6\u30eb\u4f5c\u6210<\/h2>\n\n\n\n<p>pgadmin\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u9078\u629e\u3057\u3001\u300c\u30b9\u30ad\u30fc\u30de\u300d\u2192\u300cpublic\u300d\u3068\u30c4\u30ea\u30fc\u3092\u5c55\u958b\u3057\u3066\u3044\u304d\u307e\u3059\u3002<br>\u300c+\u300d\u30dc\u30bf\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3059\u308b\u3068\u65b0\u3057\u3044\u5217\u306e\u60c5\u5831\u3092\u5165\u529b\u3059\u308b\u305f\u3081\u306e\u884c\u304c\u8ffd\u52a0\u3055\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><\/h4>\n\n\n\n<p>\u30c6\u30fc\u30d6\u30eb\u306e\u5217\u306b\u5236\u7d04\u3092\u8a2d\u5b9a\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><\/li>\n\n\n\n<li><\/li>\n<\/ul>\n\n\n\n<p><br>\u540d\u79f0\u306e\u5165\u529b\u3092\u7701\u7565\u3059\u308b\u3068\u4e3b\u30ad\u30fc\u306e\u540d\u524d\u306f\u300c\u30c6\u30fc\u30d6\u30eb\u540d_pkey\u300d\u306b\u306a\u308a\u307e\u3059<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>price\u5217<\/li>\n<\/ul>\n\n\n\n<p>price\u5217\u306b\u306f0\u4ee5\u4e0b\u306e\u6570\u5b57\u304c\u5165\u3089\u306a\u3044\u3088\u3046\u306b\u5236\u7d04\u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002<br>\u30bf\u30d6\u304b\u3089\u300c\u691c\u67fb\u300d\u3092\u9078\u629e\u3057\u3001\u540d\u79f0\u306b\u300cprice_check_constraint\u300d\u3068\u5165\u529b\u3057\u3001\u300c\u691c\u67fb\u300d\u306b\u300cprice&gt;0\u300d\u3068\u5165\u529b\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u30c7\u30fc\u30bf\u306e\u683c\u7d0d<\/h2>\n\n\n\n<p>\u30c7\u30fc\u30bf\u3092\u683c\u7d0d\u3059\u308b\u306b\u306f\u6b21\u306e2\u901a\u308a\u306e\u65b9\u6cd5\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>SQL\u6587\u3092\u5b9f\u884c\u3059\u308b\u3002<\/li>\n\n\n\n<li>\u300c\u30c7\u30fc\u30bf\u306e\u95b2\u89a7\/\u7de8\u96c6\u300d\u3092\u4f7f\u3063\u3066\u30c7\u30fc\u30bf\u3092\u767b\u9332\u3059\u308b<\/li>\n<\/ul>\n\n\n\n<p>\u30c7\u30fc\u30bf\u306e\u95b2\u89a7\/\u7de8\u96c6\u3092\u4f7f\u3046\u5834\u5408\u306f\u30c7\u30fc\u30bf\u3092\u767b\u9332\u3059\u308b\u30c6\u30fc\u30d6\u30eb\u306b\u4e3b\u30ad\u30fc\u3092\u8a2d\u5b9a\u3059\u308b\u304b\u3001\u30c6\u30fc\u30d6\u30eb\u4f5c\u6210\u6642\u306b\u300cOID\u3042\u308a\u300d\u3092Yes\u306b\u3057\u3066\u3044\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<br>\u3044\u305a\u308c\u306e\u6761\u4ef6\u3082\u6e80\u305f\u3057\u3066\u3044\u306a\u3044\u5834\u5408\u306f\u300c\u30c7\u30fc\u30bf\u306e\u95b2\u89a7\/\u7de8\u96c6\u300d\u3092\u4f7f\u3063\u305f\u30c7\u30fc\u30bf\u306e\u767b\u9332\u306f\u3067\u304d\u305a\u3001\u30c6\u30fc\u30d6\u30eb\u306e\u5185\u5bb9\u306e\u53c2\u7167\u3057\u304b\u3067\u304d\u307e\u305b\u3093\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u30c7\u30fc\u30bf\u306e\u691c\u7d22<\/h2>\n\n\n\n<p>\u300c\u30c7\u30fc\u30bf\u306e\u95b2\u89a7\/\u7de8\u96c6\u300d\u3092\u4f7f\u3063\u3066item\u30c6\u30fc\u30d6\u30eb\u304b\u3089\u4f55\u304b\u30c7\u30fc\u30bf\u3092\u691c\u7d22\u3057\u307e\u3059\u3002<br>\u691c\u7d22\u6761\u4ef6\u3092\u8a2d\u5b9a\u3059\u308b\u306b\u306f\u300c\u30c7\u30fc\u30bf\u306e\u95b2\u89a7\/\u7de8\u96c6\u300d\u2192\u300c\u30d5\u30a3\u30eb\u30bf\u30ea\u30f3\u30b0\u3057\u305f\u884c\u306e\u8868\u793a_\u300d\u3092\u9078\u629e\u3057\u307e\u3059\u3002<br>\u3059\u308b\u3068\u30c0\u30a4\u30a2\u30ed\u30b0\u30dc\u30c3\u30af\u30b9\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u3053\u306e\u3088\u3046\u306b\u6761\u4ef6\u3092\u6307\u5b9a\u3057\u3066\u305d\u306e\u6761\u4ef6\u3092\u6e80\u305f\u3059\u30c7\u30fc\u30bf\u306e\u307f\u3092\u8868\u793a\u3055\u305b\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u30e1\u30f3\u30c6\u30ca\u30f3\u30b9<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>VACUUM<\/td><td>\u4e0d\u8981\u306a\u30c7\u30fc\u30bf\u9818\u57df\u306e\u524a\u9664<\/td><\/tr><tr><td>ANALYZE<\/td><td>\u7d71\u8a08\u60c5\u5831\u306e\u66f4\u65b0<\/td><\/tr><tr><td>REINDEX<\/td><td>\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306e\u518d\u69cb\u7bc9<\/td><\/tr><tr><td>CLUSTER<\/td><td>\u30c7\u30fc\u30bf\u306e\u6574\u5217<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\"><\/h2>\n\n\n\n<p>pgAdmin\u3067\u306fPostgreSQL\u3078\u30ed\u30b0\u30a4\u30f3\u3067\u304d\u308b\u30ed\u30fc\u30eb\u3068\u30b0\u30eb\u30fc\u30d7\u30ed\u30fc\u30eb\u3092\u7ba1\u7406\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<br>\u30ed\u30fc\u30eb\u3068\u306f\u30e6\u30fc\u30b6\u30fc\u3068\u30b0\u30eb\u30fc\u30d7\u306e\u6982\u5ff5\u3092\u307e\u3068\u3081\u305f\u3082\u306e\u3067\u30ed\u30b0\u30a4\u30f3\u6a29\u9650\u3084\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u4f5c\u6210\u6a29\u9650\u306a\u3069\u3092\u7d30\u304b\u304f\u8a2d\u5b9a\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\/\u30ea\u30b9\u30c8\u30a2<\/h2>\n\n\n\n<p>\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306b\u4f55\u3089\u304b\u306e\u969c\u5bb3\u304c\u767a\u751f\u3057\u305f\u3068\u304d\u306b\u5143\u306e\u72b6\u614b\u306b\u5fa9\u65e7\u3067\u304d\u308b\u3088\u3046\u3001\u5b9a\u671f\u7684\u306b\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u3057\u3066\u304a\u304f\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<br>pgAdmin4\u3067\u306f\u30b5\u30fc\u30d0\u30fc\u3084\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3001\u30c6\u30fc\u30d6\u30eb\u5358\u4f4d\u3067\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u3068\u30ea\u30b9\u30c8\u30a2\u3092\u5b9f\u884c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u30ea\u30b9\u30c8\u30a2<\/h4>\n\n\n\n<p>\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u3057\u305f\u30d5\u30a1\u30a4\u30eb\u3092\u9078\u629e\u3057\u3001\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u6307\u5b9a\u3059\u308b\u3053\u3068\u3067\u30c7\u30fc\u30bf\u3092\u5fa9\u5143\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">SQL<\/h2>\n\n\n\n<p>PostgreSQL\u3067SQL\u3092\u5b9f\u884c\u3059\u308b\u306b\u306fpsql\u3068\u3044\u3046SQL\u30a4\u30f3\u30bf\u30d7\u30ea\u30bf\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u5229\u7528\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>psql\u30b3\u30de\u30f3\u30c9\u3067\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306b\u63a5\u7d9a\u3059\u308b\u7c21\u5358\u306a\u65b9\u6cd5\u306f\u6b21\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>psql \u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u540d \u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30e6\u30fc\u30b6\u30fc\u540d<\/code><\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">PHP\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3<\/h2>\n\n\n\n<p>C:\\php-8.2.1\u306e\u76f4\u4e0b\u306b\u3042\u308b\u958b\u767a\u74b0\u5883\u5411\u3051\u306e\u3072\u306a\u578b\u30d5\u30a1\u30a4\u30eb\u300cphp.ini-development\u300d\u306e\u540d\u524d\u3092\u300cphp.ini\u300d\u306b\u5909\u66f4\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>[\u5909\u66f4\u524d]\n;extension_dir = &quot;ext&quot;\n[\u5909\u66f4\u5f8c]\nextension_dir = &quot;C:\\php-8.2.1\\ext&quot;<\/code><\/pre><\/div>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>[\u5909\u66f4\u524d]\n;extension=mbstring\n;extension=openssl\n;extension=pdo_pgsql\n;extension=pgsql\n\n[\u5909\u66f4\u5f8c]\nextension=mbstring\nextension=openssl\nextension=pdo_pgsql\nextension=pgsql<\/code><\/pre><\/div>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>[\u5909\u66f4\u524d]\n;date.timezone =\n[\u5909\u66f4\u5f8c]\ndate.timezone = &quot;Asia\/Tokyo&quot;<\/code><\/pre><\/div>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>[\u5909\u66f4\u524d]\nsession.use_strict_mode = 0\n[\u5909\u66f4\u5f8c]\nsession.use_strict_mode = 1<\/code><\/pre><\/div>\n\n\n\n<p>PHP\u304b\u3089PostgreSQL\u3078\u306e\u63a5\u7d9a\u3092PDO\u3068\u3044\u3046\u30af\u30e9\u30b9\u3092\u4f7f\u7528\u3057\u3066\u5b9f\u73fe\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"564\" height=\"123\" src=\"https:\/\/www.agile-software.site\/wp-content\/uploads\/2023\/01\/connect.png\" alt=\"\" class=\"wp-image-2515\"\/><\/figure>\n\n\n\n<p>PDO\u30af\u30e9\u30b9\u3067PostgreSQL\u3078\u306e\u63a5\u7d9a\u3092\u30aa\u30fc\u30d7\u30f3\u306b\u3057\u307e\u3059\u3002\u3053\u306e\u3068\u304dhost\u3001port\u3001dbname\u3001user\u3001password\u306a\u3069\u3068\u3044\u3063\u305f\u30d1\u30e9\u30e1\u30fc\u30bf\u3092\u6587\u5b57\u5217\u3068\u3057\u3066\u6307\u5b9a\u3057\u307e\u3059\u3002\u63a5\u7d9a\u304c\u6210\u529f\u3059\u308b\u3068PDO\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u8fd4\u3057\u307e\u3059\u3002<br>\u5931\u6557\u3059\u308b\u3068PDO\u306e\u30a8\u30e9\u30fc\u30e2\u30fc\u30c9\u3068\u3057\u3066PDO::ERRMODE_EXCEPTION\u304c\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u308b\u306e\u3067\u3001\u4f8b\u5916\u304c\u6295\u3052\u3089\u308c\u3001\u69d8\u3005\u306a\u30a8\u30e9\u30fc\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\u8868\u793a\u3055\u308c\u305f\u5f8c\u3067\u51e6\u7406\u304c\u7d42\u4e86\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>[PDO::ATTR_ERRMODE =&gt; PDO::ERRMODE_EXCEPTION]<\/code><\/pre><\/div>\n\n\n\n<p>$dbh\u306b\u63a5\u7d9a\u3057\u305f\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306b\u5bfe\u3057\u3066SQL\u6587\u3092\u767a\u884c\u3057\u3001\u7d50\u679c\u3092PDOStatement\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3068\u3057\u3066$sth\u306b\u8fd4\u3057\u307e\u3059\u3002\u300c\u30c6\u30fc\u30d6\u30ebitem\u3092\u5bfe\u8c61\u306bid\u306e\u6607\u9806\u3067\u5217id\u3001name\u3001price\u306e\u5024\u3092\u53d6\u5f97\u3057\u306a\u3055\u3044\u300d\u3068\u3044\u3046\u547d\u4ee4\u6587\u3067\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>$sth= $dbh-&gt;query(\n    &#39;SELECT id, name, price&#39;.&#39;FROM item&#39;.&#39;ORDER BY id&#39;\n)<\/code><\/pre><\/div>\n\n\n\n<p>foreach\u6587\u3067\u306f$rows\u306b\u683c\u7d0d\u3055\u308c\u3066\u3044\u308b\u914d\u5217\u30921\u884c\u305a\u3064\u53d6\u308a\u51fa\u3057\u3066$r\u306b\u8a2d\u5b9a<br>\u30c7\u30fc\u30bf\u304c\u898b\u3064\u304b\u3063\u305f\u5834\u5408\u3001fetchAll\u30e1\u30bd\u30c3\u30c9\u306f\u3059\u3079\u3066\u306e\u884c\u3092\u8fd4\u3057\u307e\u3059\u304c\u3001\u3053\u3053\u3067\u306f\u4e00\u3064\u76ee\u306e\u5f15\u6570\u3068\u3057\u3066\u30d5\u30a7\u30c3\u30c1\u30b9\u30bf\u30a4\u30ebPDO::FETCH_ASSOC\u3092\u6307\u5b9a\u3057\u3066\u3044\u307e\u3059\u3002\u30c7\u30d5\u30a9\u30eb\u30c8\u306fPDO::FETCH_BOTH\u3067\u3053\u308c\u306f\u7d50\u679c\u30bb\u30c3\u30c8\u306b\u8fd4\u3055\u308c\u305f\u969b\u306e\u30ab\u30e9\u30e0\u540d\u30680\u3067\u59cb\u307e\u308b\u30ab\u30e9\u30e0\u756a\u53f7\u3067\u30ad\u30fc\u3092\u4ed8\u3051\u305f\u914d\u5217\u3092\u8fd4\u3059\u306e\u3067\u3059\u304c\u3001\u4eca\u56de\u306f\u30ab\u30e9\u30e0\u540d\u306e\u307f\u3067\u8fd4\u3059PDO::FETCH_ASSOC\u3092\u4f7f\u3046\u3002<\/p>\n\n\n\n<p>htmlspecialchars\u95a2\u6570\u306f\u5f15\u6570\u3068\u3057\u3066\u6e21\u3055\u308c\u305f\u30c6\u30ad\u30b9\u30c8\u5185\u306eHTML\u3068\u3057\u3066\u7279\u6b8a\u306a\u610f\u5473\u3092\u6301\u3064\u6587\u5b57(&lt;,>,&#8221;,&amp;\u306a\u3069)\u3092\u30d6\u30e9\u30a6\u30b6\u304c\u8aa4\u3063\u3066\u89e3\u91c8\u3057\u306a\u3044\u6587\u5b57\u5217(&amp;lt;,&amp;gt;,&amp;quot;,&amp;amp;\u306a\u3069)\u306b\u5909\u63db\u3059\u308b\u95a2\u6570\u3067\u3059\u3002<\/p>\n\n\n\n<p>number_format\u95a2\u6570\u306f\u6570\u5b57\u3092\u5343\u4f4d\u3054\u3068\u306b\u30b0\u30eb\u30fc\u30d7\u5316\u3059\u308b\u95a2\u6570\u3067\u3059\u3002<\/p>\n\n\n\n<p>\u30d7\u30ea\u30da\u30a2\u30fc\u30c9\u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u306f\u5148\u306bSQL\u3092\u6e96\u5099\u30fb\u30d1\u30fc\u30b9\u3055\u305b\u3066\u304a\u304d\u3001\u3042\u3068\u3067\u30d1\u30e9\u30e1\u30fc\u30bf\u306e\u5024\u3092\u6307\u5b9a\u3057\u3066\u5b9f\u884c\u3059\u308b\u4ed5\u7d44\u307f\u3002<\/p>\n\n\n\n<p>execute\u30e1\u30bd\u30c3\u30c9\u306f\u5f15\u6570\u3092PostgreSQL\u306e\u30b5\u30fc\u30d0\u30fc\u306b\u9001\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u767b\u9332\u306b\u6210\u529f\u3057\u305f\u5834\u5408\u306fheader\u95a2\u6570\u3092\u4f7f\u3063\u3066\u65b0\u3057\u3044URL\u3078\u30ea\u30c0\u30a4\u30ec\u30af\u30c8\u3055\u305b\u307e\u3059\u3002<br>header\u95a2\u6570\u306f\u30d6\u30e9\u30a6\u30b6\u306bHTTP\u30d8\u30c3\u30c0\u30fc\u3092\u9001\u4fe1\u3057\u307e\u3059\u304c\u300cLocation\u300d\u3068\u3044\u3046\u30d8\u30c3\u30c0\u30fc\u3092\u9001\u4fe1\u3059\u308b\u3053\u3068\u3067\u30d6\u30e9\u30a6\u30b6\u306b\u305d\u306eURL\u3078\u30ea\u30c0\u30a4\u30ec\u30af\u30c8\u3055\u305b\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p>rawurlencode\u95a2\u6570\u306fPHP\u306e\u5909\u6570\u3092GET\u306a\u3069\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u3068\u3057\u3066\u8a8d\u8b58\u3067\u304d\u308b\u5f62\u5f0f\u306b\u30a8\u30f3\u30b3\u30fc\u30c9\u3057\u3066\u304f\u308c\u308b\u95a2\u6570\u3067\u3059\u3002<\/p>\n\n\n\n<p>JavaScript\u306econfirm\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3063\u3066\u78ba\u8a8d\u306e\u30d7\u30ed\u30f3\u30d7\u30c8\u3092\u8868\u793a\u3059\u308b\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>&lt;form action=&quot;do.php&quot; method=&quot;post&quot; onsubmit=&quot;return confirm(&#39;\u672c\u5f53\u306b\u524a\u9664\u3057\u307e\u3059\u304b\uff1f&#39;);&quot;&gt;\n          &lt;input type=&quot;hidden&quot; name=&quot;mode&quot; value=&quot;del&quot;&gt;\n          &lt;input type=&quot;hidden&quot; name=&quot;id&quot; value=&quot;&lt;?php echo htmlspecialchars($r[&#39;id&#39;], ENT_QUOTES); ?&gt;&quot;&gt;\n          &lt;input type=&quot;submit&quot; value=&quot;\u524a\u9664&quot;&gt;\n        &lt;\/form&gt;<\/code><\/pre><\/div>\n","protected":false},"excerpt":{"rendered":"<p>pgAdmin4 pgAdmin4\u306fPostgreSQL\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3084\u30e6\u30fc\u30b6\u30fc\u306a\u3069\u3092\u7ba1\u7406\u3059\u308b\u305f\u3081\u306eGUI\u30c4\u30fc\u30eb\u3067\u3059\u3002\u30b9\u30bf\u30fc\u30c8\u30e1\u30cb\u30e5\u30fc\u304b\u3089\u300cPostgreSQL 15\u300d\u2192\u300cpgAdmin4\u300d\u3068\u9078\u629e\u3059\u308b\u3053\u3068\u3067pgAdmin<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jin_ogp_image_url":"","_jin_last_featured_id":0,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-2430","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/agile-software.net\/index.php?rest_route=\/wp\/v2\/posts\/2430","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/agile-software.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/agile-software.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/agile-software.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/agile-software.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2430"}],"version-history":[{"count":4,"href":"https:\/\/agile-software.net\/index.php?rest_route=\/wp\/v2\/posts\/2430\/revisions"}],"predecessor-version":[{"id":2516,"href":"https:\/\/agile-software.net\/index.php?rest_route=\/wp\/v2\/posts\/2430\/revisions\/2516"}],"wp:attachment":[{"href":"https:\/\/agile-software.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2430"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/agile-software.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2430"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/agile-software.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2430"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}