{"id":12110,"date":"2022-03-02T06:46:30","date_gmt":"2022-03-01T21:46:30","guid":{"rendered":"http:\/\/www.gisdeveloper.co.kr\/?p=12110"},"modified":"2022-03-02T06:47:28","modified_gmt":"2022-03-01T21:47:28","slug":"postgresql-%eb%ac%b8%ec%9e%90%ec%97%b4-%ea%b0%92-insert-%ed%95%a0-%eb%95%8c","status":"publish","type":"post","link":"http:\/\/www.gisdeveloper.co.kr\/?p=12110","title":{"rendered":"[PostgreSQL] \ubb38\uc790\uc5f4 \uac12 INSERT \ud560 \ub54c &#8230;"},"content":{"rendered":"<p>INSERT \ubb38\uc744 \uad6c\uc131\ud560 \ub54c \ubb38\uc790\uc5f4 \uac12\uc774\ub77c\ub294 \uc758\ubbf8\ub97c \uc678\ub530\uc634\ud45c\ub85c \uc2dc\uc791\ud574\uc11c \uc678\ub530\uc634\ud45c\ub85c \ub05d\ub0a9\ub2c8\ub2e4. \uadf8\ub807\ub2e4\uba74 \uc678\ub530\uc634\ud45c \uc790\uccb4\ub97c \ubb38\uc790\uc5f4 \uac12\uc73c\ub85c \ub123\uace0 \uc2f6\ub2e4\uba74&#8230; \uc678\ub530\uc6c0\ud45c\ub97c 2\uac1c \ub123\uc5b4\uc8fc\uba74 \ub429\ub2c8\ub2e4. \uadf8\ub9ac\uace0 \uc904\uac04\ud589(Carrage Return) \ubb38\uc790\ub294 \uc544\uc2a4\ud0a4\uac12 10\ubc88\uc774\ubbc0\ub85c CHR(10)\uac00 \ub418\ub294\ub370.. \uc774\ucc98\ub7fc \uac12\uc774 \uc678\ub530\uc634\ud45c\uc77c\ub54c\uc640 \uc904\uac04\ud589 \ubb38\uc790\uc5d0 \ub300\ud55c \uc800\uc7a5\uc744 \uc704\ud574 \ub2e4\uc74c \ucf54\ub4dc \uc608\uc2dc\uac00 \ub3c4\uc6c0\uc774 \ub418\uae38 \ubc14\ub78d\ub2c8\ub2e4.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"js\">\r\nconst sql = `\r\n    select geoservice_add_archive(\r\n        ${window._userId},\r\n        ${this.#directoryId?this.#directoryId:\"NULL\"},\r\n        '${savedFileName.replaceAll(\"'\", \"''\")}',\r\n        '${file.name.replaceAll(\"'\", \"''\")}',\r\n        ${this.#selectEPSG.disabled?\"NULL\":this.#selectEPSG.value},\r\n        ${file.size},\r\n        '${this.#textInputTitle.value.replaceAll(\"'\", \"''\")}',\r\n        '${this.#memo.value.replaceAll(\"'\", \"''\").replaceAll(\"\\n\", \"'||CHR(10)||'\")}',\r\n        '${this.#selectedFile.MD5}',\r\n        TRUE,\r\n        TRUE\r\n    ) r        \r\n`;\r\n<\/pre>\n<p>\ucc38\uace0\ub85c geoservice_add_archive\ub294 DB \ud504\ub85c\uc2dc\uc838\uc774\ubbc0\ub85c \ubb34\uc2dc\ud558\uace0 \uad00\uc2ec\uc758 \ub300\uc0c1\uc744 \ubb38\uc790\uc5f4\uac12\uc5d0 \ub300\ud55c \ucc98\ub9ac\uc5d0 \uc911\uc9d1\ud558\uba74 \ub429\ub2c8\ub2e4.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>INSERT \ubb38\uc744 \uad6c\uc131\ud560 \ub54c \ubb38\uc790\uc5f4 \uac12\uc774\ub77c\ub294 \uc758\ubbf8\ub97c \uc678\ub530\uc634\ud45c\ub85c \uc2dc\uc791\ud574\uc11c \uc678\ub530\uc634\ud45c\ub85c \ub05d\ub0a9\ub2c8\ub2e4. \uadf8\ub807\ub2e4\uba74 \uc678\ub530\uc634\ud45c \uc790\uccb4\ub97c \ubb38\uc790\uc5f4 \uac12\uc73c\ub85c \ub123\uace0 \uc2f6\ub2e4\uba74&#8230; \uc678\ub530\uc6c0\ud45c\ub97c 2\uac1c \ub123\uc5b4\uc8fc\uba74 \ub429\ub2c8\ub2e4. \uadf8\ub9ac\uace0 \uc904\uac04\ud589(Carrage Return) \ubb38\uc790\ub294 \uc544\uc2a4\ud0a4\uac12 10\ubc88\uc774\ubbc0\ub85c CHR(10)\uac00 \ub418\ub294\ub370.. \uc774\ucc98\ub7fc \uac12\uc774 \uc678\ub530\uc634\ud45c\uc77c\ub54c\uc640 \uc904\uac04\ud589 \ubb38\uc790\uc5d0 \ub300\ud55c \uc800\uc7a5\uc744 \uc704\ud574 \ub2e4\uc74c \ucf54\ub4dc \uc608\uc2dc\uac00 \ub3c4\uc6c0\uc774 \ub418\uae38 \ubc14\ub78d\ub2c8\ub2e4. const sql = ` select geoservice_add_archive( ${window._userId}, ${this.#directoryId?this.#directoryId:&#8221;NULL&#8221;}, &#8216;${savedFileName.replaceAll(&#8220;&#8216;&#8221;, &#8220;&#8221;&#8221;)}&#8217;, &#8216;${file.name.replaceAll(&#8220;&#8216;&#8221;, &hellip; <\/p>\n<p class=\"link-more\"><a href=\"http:\/\/www.gisdeveloper.co.kr\/?p=12110\" class=\"more-link\">\ub354 \ubcf4\uae30<span class=\"screen-reader-text\"> &#8220;[PostgreSQL] \ubb38\uc790\uc5f4 \uac12 INSERT \ud560 \ub54c &#8230;&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-12110","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/12110","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=12110"}],"version-history":[{"count":1,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/12110\/revisions"}],"predecessor-version":[{"id":12111,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/12110\/revisions\/12111"}],"wp:attachment":[{"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=12110"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=12110"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=12110"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}