{"id":5204,"date":"2018-05-06T18:25:53","date_gmt":"2018-05-06T09:25:53","guid":{"rendered":"http:\/\/www.gisdeveloper.co.kr\/?p=5204"},"modified":"2018-05-06T21:44:01","modified_gmt":"2018-05-06T12:44:01","slug":"postgresql%ec%9d%98-function-%ec%9a%94%ec%95%bd","status":"publish","type":"post","link":"http:\/\/www.gisdeveloper.co.kr\/?p=5204","title":{"rendered":"PostgreSQL\uc758 Function \uc694\uc57d"},"content":{"rendered":"<p>\uc544\ub798\ub294 PostgreSQL\uc758 \ud568\uc218\ub97c \uc694\uc57d\ud55c \ub0b4\uc6a9\uc774\uba70, \ubcf4\ub2e4 \uc790\uc138\ud55c \ub0b4\uc6a9\uacfc \uc608\uc81c\ub294 https:\/\/www.techonthenet.com\/postgresql\/functions\/index.php \ucc38\uace0\ud558\uae30 \ubc14\ub78d\ub2c8\ub2e4.<\/p>\n<h3>String Functions<\/h3>\n<ul>\n<li><b>btrim :<\/b> \ubb38\uc790\uc5f4\uc758 \uc2dc\uc791\uacfc \ub05d \uc591\ucabd\uc5d0 \uc9c0\uc815\ub41c \ubb38\uc790\ub4e4\uc744 \uc81c\uac70<\/li>\n<li><b>char_length :<\/b> \ubb38\uc790\uc5f4\uc758 \uae38\uc774\ub97c \ubc18\ud658<\/li>\n<li><b>character_length :<\/b> \uc9c0\uc815\ub41c \ubb38\uc790\uc5f4\uc758 \uae38\uc774\ub97c \ubc18\ud658<\/li>\n<li><b>|| :<\/b> 2\uac1c\uc758 \ubb38\uc790\uc5f4\uc744 \ud569\ud558\uc5ec \ubc18\ud658<\/li>\n<li><b>initcap :<\/b> \ubb38\uc790\uc5f4 \uc911 \uccab\ubc88\uc9f8 \ubb38\uc790\ub294 \ub300\ubb38\uc790\ub85c \ubcc0\ud658\ud558\uace0 \ub098\uba38\uc9c0\ub294 \uc18c\ubb38\uc790\ub85c \ubcc0\ud658<\/li>\n<li><b>length :<\/b> \ubb38\uc790\uc5f4\uc758 \uae38\uc774\ub97c \ubc18\ud658<\/li>\n<li><b>lower :<\/b> \uc9c0\uc815\ub41c \ubb38\uc790\uc5f4\uc744 \ubaa8\ub450 \uc18c\ubb38\uc790\ub85c \ubcc0\ud658<\/li>\n<li><b>lpad :<\/b> \uc9c0\uc815\ub41c \ubb38\uc790\uc5f4\uc744 \uc6d0\ud558\ub294 \uae38\uc774\ub85c \ub9de\ucd94\ub294\ub370, \uc774\ub54c \ubd80\uc871\ud55c \ubb38\uc790\ub97c \uc67c\ucabd\uc5d0 \ucc44\uc6c0<\/li>\n<li><b>ltrim :<\/b> \ubb38\uc790\uc5f4\uc758 \uc67c\ucabd\uc5d0\uc11c \uc9c0\uc815\ub41c \ubaa8\ub4e0 \ubb38\uc790\ub97c \uc81c\uac70<\/li>\n<li><b>position :<\/b> \ubb38\uc790\uc5f4\uc5d0\uc11c \uc9c0\uc815\ub41c \ubb38\uc790\uc5f4\uc774 \uc874\uc7ac\ud558\ub294 \uc778\ub371\uc2a4\uac12\uc744 \ubc18\ud658<\/li>\n<li><b>repeat :<\/b> \ubb38\uc790\uc5f4\uc744 \uc6d0\ud558\ub294 \ub9cc\ud07c \ubc18\ubcf5\ud574\uc11c \ubc18\ud658<\/li>\n<li><b>replace :<\/b> \uae30\uc874\uc758 \ubb38\uc790\uc5f4\uc744 \uad6c\uc131\ud558\ub294 \ubd80\ubd84 \ubb38\uc790\uc5f4\uc744 \uc6d0\ud558\ub294 \ubb38\uc790\uc5f4\ub85c \ubcc0\ud658<\/li>\n<li><b>rpad :<\/b> \uc9c0\uc815\ub41c \ubb38\uc790\uc5f4\uc744 \uc6d0\ud558\ub294 \uae38\uc774\ub85c \ub9de\ucd94\ub294\ub370, \uc774\ub54c \ubd80\uc871\ud55c \ubb38\uc790\ub97c \uc624\ub978\ucabd\uc5d0 \ucc44\uc6c0<\/li>\n<li><b>rtrim :<\/b> \ubb38\uc790\uc5f4\uc758 \uc624\ub978\ucabd\uc5d0\uc11c \uc9c0\uc815\ub41c \ubaa8\ub4e0 \ubb38\uc790\ub97c \uc81c\uac70<\/li>\n<li><b>strpos :<\/b> \uae30\uc874\uc758 \ubb38\uc790\uc5f4\uc5d0\uc11c \ucc3e\uace0\uc790 \ud558\ub294 \ubd80\ubd84 \ubb38\uc790\uc5f4\uc758 \uc704\uce58\ub97c \ubc18\ud658<\/li>\n<li><b>substring :<\/b> \uc8fc\uc5b4\uc9c4 \ubb38\uc790\uc5f4\uc5d0\uc11c \uc6d0\ud558\ub294 \ubd80\ubd84 \ubb38\uc790\uc5f4\uc744 \ucd94\ucd9c<\/li>\n<li><b>translate :<\/b> \uae30\uc874\uc758 \ubb38\uc790\uc5f4 \uc911 \uce58\ud658\ud558\uace0\uc790 \ud558\ub294 \ubb38\uc790\uc5f4\uc744 \uc9c0\uc815\ud574 \ubcc0\ud658<\/li>\n<li><b>trim :<\/b> \ubb38\uc790\uc5f4\uc758 \uc2dc\uc791\uacfc \ub05d \uc591\ucabd\uc5d0 \uc9c0\uc815\ub41c \ubb38\uc790\ub4e4\uc744 \uc81c\uac70<\/li>\n<li><b>upper :<\/b> \ubb38\uc790\uc5f4\uc744 \ubaa8\ub450 \ub300\ubb38\uc790\ub85c \ubcc0\ud658<\/li>\n<\/ul>\n<h3>Numeric\/Math Functions<\/h3>\n<ul>\n<li><b>abs :<\/b> \uc808\ub300\uac12 \ubc18\ud658<\/li>\n<li><b>avg :<\/b> \ud3c9\uade0\uac12 \ubc18\ud658<\/li>\n<li><b>ceil :<\/b> \uc18c\uc218\uc810 \uc790\ub9ac\ub97c \ubb34\uc870\uac74 \uc62c\ub824 \uc815\uc218 \ubc18\ud658<\/li>\n<li><b>ceiling :<\/b> \uc18c\uc218\uc810 \uc790\ub9ac\ub97c \ubb34\uc870\uac74 \uc62c\ub824 \uc815\uc218 \ubc18\ud658<\/li>\n<li><b>count :<\/b> \uac1c\uc218 \ubc18\ud658<\/li>\n<li><b>div :<\/b> 2\uac1c\uc758 \uc218\ub97c \ub098\ub220\uc11c \uadf8 \ubaab(\uc815\uc218)\uc744 \ubc18\ud658<\/li>\n<li><b>exp :<\/b> e(2.71828182845904)\uc758 \uc81c\uacf1\uac12 \ubc18\ud658<\/li>\n<li><b>floor :<\/b> \uc9c0\uc815\ub41c \uc218\uc640 \uac19\uac70\ub098 \uc791\uc740 \uc815\uc218 \ubc18\ud658<\/li>\n<li><b>max :<\/b> \ucd5c\ub300\uac12 \ubc18\ud658<\/li>\n<li><b>min :<\/b> \ucd5c\uc18c\uac12 \ubc18\ud658<\/li>\n<li><b>mod :<\/b> 2\uac1c\uc758 \uc218\ub97c \ub098\ub208 \uadf8 \ub098\uba38\uc9c0 \ubc18\ud658<\/li>\n<li><b>power :<\/b> \uac70\ub4ed \uc81c\uacf1\uc758 \uacb0\uacfc \ubc18\ud658<\/li>\n<li><b>random :<\/b> [0~1) \uc0ac\uc774\uc758 \ub09c\uc218\uac12 \ubc18\ud658<\/li>\n<li><b>round :<\/b> \uc6d0\ud558\ub294 \uc790\ub9ac\uc218\uc5d0\uc11c\uc758 \ubc18\uc62c\ub9bc\ud55c \uac12\uc744 \ubc18\ud658<\/li>\n<li><b>setseed :<\/b> \ub09c\uc218 \ubc1c\uc0dd\uc2dc \uadf8 \uc528\uc557\uac12\uc744 \uc124\uc815.<\/li>\n<li><b>sign :<\/b> \uc8fc\uc5b4\uc9c4 \uc218\uc5d0 \ub300\ud55c \ubd80\ud638 \ubc18\ud658.<\/li>\n<li><b>sqrt :<\/b> \ub8e8\ud22c(root) \uac12 \ubc18\ud658.<\/li>\n<li><b>sum :<\/b> \ud569\uacc4 \ubc18\ud658.<\/li>\n<li><b>trunc :<\/b> \uc6d0\ud558\ub294 \uc790\ub9ac\uc218\uae4c\uc9c0\uc758 \uac12\uc744 \ubc18\uc62c\ub9bc \uc5c6\uc774 \ubc18\ud658<\/li>\n<\/ul>\n<h3>Date\/Time Functions<\/h3>\n<ul>\n<li><b>age :<\/b> \ub450 \ub0a0\uc9dc \uc0ac\uc774\uc758 \uc2dc\uac04 \uac04\uaca9\uc744 \ub144, \uc6d4, \uc77c\ub85c\ub41c \ubb38\uc790\uc5f4\ub85c \ubc18\ud658<\/li>\n<li><b>current_date :<\/b> \ud604\uc7ac\uc758 \ub0a0\uc9dc \ubc18\ud658<\/li>\n<li><b>current_time :<\/b> Time Zone\uc744 \uac16\ub294 \ud604\uc7ac\uc758 \uc2dc\uac04\uc744 \ubc18\ud658<\/li>\n<li><b>current_timestamp :<\/b> Time Zone\uc744 \uac16\ub294 \ud604\uc7ac\uc758 \ub0a0\uc9dc\uc640 \uc2dc\uac04\uc744 \ubc18\ud658<\/li>\n<li><b>date_part :<\/b> \uc2dc\uac04 \ub610\ub294 \ub0a0\uc9dc\ub85c\ubd80\ud130 \uc6d0\ud558\ub294 \ubd80\ubd84(\ub144, \uc6d4, \uc77c, \uc2dc, \ubd84, \uc77c, \ucd08 \ub4f1)\uc744 \ubc18\ud658<\/li>\n<li><b>extract :<\/b> \uc2dc\uac04 \ub610\ub294 \ub0a0\uc9dc\ub85c\ubd80\ud130 \uc6d0\ud558\ub294 \ubd80\ubd84(\ub144, \uc6d4, \uc77c, \uc2dc, \ubd84, \uc77c, \ucd08 \ub4f1)\uc744 \ubc18\ud658<\/li>\n<li><b>localtime :<\/b> \ud604\uc7ac\uc758 \uc2dc\uac04\uc744 \ubc18\ud658<\/li>\n<li><b>localtimestamp :<\/b> \ud604\uc7ac\uc758 \uc2dc\uac04\uacfc \ub0a0\uc9dc\ub97c \ubc18\ud658<\/li>\n<li><b>now :<\/b> Time Zone\uc744 \uac16\ub294 \ud604\uc7ac\uc758 \ub0a0\uc9dc\uc640 \uc2dc\uac04\uc744 \ubc18\ud658<\/li>\n<\/ul>\n<h3>Conversion Functions<\/h3>\n<ul>\n<li><b>to_char :<\/b> \uc22b\uc790 \ub610\ub294 \ub0a0\uc9dc\ub97c \ubb38\uc790\uc5f4\ub85c \ubcc0\ud658<\/li>\n<li><b>to_date :<\/b> \ubb38\uc790\uc5f4\uc744 \ub0a0\uc9dc\ub85c \ubcc0\ud658<\/li>\n<li><b>to_number :<\/b> \ubb38\uc790\uc5f4\uc744 \uc22b\uc790\ub85c \ubcc0\ud658<\/li>\n<li><b>to_timestamp :<\/b> \ubb38\uc790\uc5f4\uc744 \ud0c0\uc784\uc2a4\ud0ec\ud504(Timestamp)\ub85c \ubcc0\ud658<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\uc544\ub798\ub294 PostgreSQL\uc758 \ud568\uc218\ub97c \uc694\uc57d\ud55c \ub0b4\uc6a9\uc774\uba70, \ubcf4\ub2e4 \uc790\uc138\ud55c \ub0b4\uc6a9\uacfc \uc608\uc81c\ub294 https:\/\/www.techonthenet.com\/postgresql\/functions\/index.php \ucc38\uace0\ud558\uae30 \ubc14\ub78d\ub2c8\ub2e4. String Functions btrim : \ubb38\uc790\uc5f4\uc758 \uc2dc\uc791\uacfc \ub05d \uc591\ucabd\uc5d0 \uc9c0\uc815\ub41c \ubb38\uc790\ub4e4\uc744 \uc81c\uac70 char_length : \ubb38\uc790\uc5f4\uc758 \uae38\uc774\ub97c \ubc18\ud658 character_length : \uc9c0\uc815\ub41c \ubb38\uc790\uc5f4\uc758 \uae38\uc774\ub97c \ubc18\ud658 || : 2\uac1c\uc758 \ubb38\uc790\uc5f4\uc744 \ud569\ud558\uc5ec \ubc18\ud658 initcap : \ubb38\uc790\uc5f4 \uc911 \uccab\ubc88\uc9f8 \ubb38\uc790\ub294 \ub300\ubb38\uc790\ub85c \ubcc0\ud658\ud558\uace0 \ub098\uba38\uc9c0\ub294 \uc18c\ubb38\uc790\ub85c \ubcc0\ud658 length : \ubb38\uc790\uc5f4\uc758 \uae38\uc774\ub97c &hellip; <\/p>\n<p class=\"link-more\"><a href=\"http:\/\/www.gisdeveloper.co.kr\/?p=5204\" class=\"more-link\">\ub354 \ubcf4\uae30<span class=\"screen-reader-text\"> &#8220;PostgreSQL\uc758 Function \uc694\uc57d&#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-5204","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\/5204","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=5204"}],"version-history":[{"count":8,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/5204\/revisions"}],"predecessor-version":[{"id":9606,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/5204\/revisions\/9606"}],"wp:attachment":[{"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5204"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5204"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5204"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}