{"id":1241,"date":"2024-11-27T09:25:42","date_gmt":"2024-11-27T06:25:42","guid":{"rendered":"https:\/\/aristov.tech\/blog\/?p=1241"},"modified":"2024-11-27T09:25:42","modified_gmt":"2024-11-27T06:25:42","slug":"funkczii-dlya-raboty-s-dannymi-v-postgresql","status":"publish","type":"post","link":"https:\/\/aristov.tech\/blog\/funkczii-dlya-raboty-s-dannymi-v-postgresql\/","title":{"rendered":"\u0424\u0443\u043d\u043a\u0446\u0438\u0438 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0432 PostgreSQL"},"content":{"rendered":"\n<p>\u0421\u0442\u0430\u0442\u044c\u044f \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0430 \u043d\u0430\u00a0<a href=\"https:\/\/youtu.be\/T3nYIP7XgiQ\">28 \u0432\u0438\u0434\u0435\u043e<\/a>\u00a0\u0438\u0437 30 \u0442\u0435\u043c\u00a0<a href=\"https:\/\/aristov.tech\/blog\/kurs-sql-c-0\/\">\u043a\u0443\u0440\u0441\u0430 SQL c 0<\/a>\u00a0\u043e\u0442 \u0410\u0440\u0438\u0441\u0442\u043e\u0432\u0430 \u0415\u0432\u0433\u0435\u043d\u0438\u044f. \u0421\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u0432\u0438\u0434\u0435\u043e \u043d\u0430 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430\u0445 <a href=\"https:\/\/rutube.ru\/video\/28156522554e4c8b91ac2cae6cfa9875\/\">RUTUBE<\/a> \u0438 <a href=\"https:\/\/vk.com\/video-212716752_456239092\">VK \u0432\u0438\u0434\u0435\u043e<\/a>.<\/p>\n\n\n\n<p>\u0420\u0430\u043d\u0435\u0435 <a href=\"https:\/\/aristov.tech\/blog\/tipy-dannyh-postgresql\/\">\u0432 \u0441\u0442\u0430\u0442\u044c\u0435<\/a> \u043c\u044b \u0443\u0436\u0435 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u043b\u0438 \u0442\u0438\u043f\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 PostgreSQL, \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u0443\u0437\u043d\u0430\u0435\u043c, \u043a\u0430\u043a \u0441 \u044d\u0442\u0438\u043c\u0438 \u0442\u0438\u043f\u0430\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c.<\/p>\n\n\n\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u0438 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0432 PostgreSQL \u0445\u043e\u0440\u043e\u0448\u043e \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u044b, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0431\u044b\u0441\u0442\u0440\u043e. \u041d\u043e \u043b\u0438\u0447\u043d\u043e \u043c\u043e\u0451 \u043c\u043d\u0435\u043d\u0438\u0435, \u0435\u0441\u043b\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u043c\u043e\u0436\u043d\u043e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043d\u0430 \u0431\u044d\u043a\u044d\u043d\u0434\u0435, \u0442\u043e \u043b\u0443\u0447\u0448\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u0443\u044e \u0437\u0430\u0434\u0430\u0447\u0443 \u0442\u0443\u0434\u0430. \u041e\u0434\u043d\u0430\u043a\u043e \u0432 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0432 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n\n\n\n<p>\u041f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0432\u0430\u0436\u043d\u043e \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u0442\u043e, \u043a\u0430\u043a\u0438\u0435 \u0442\u0438\u043f\u044b \u043e\u043d\u0438 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u044e\u0442 \u0438 \u043a\u0430\u043a\u0438\u0435 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e\u0442. \u041d\u0435 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0430\u0432\u0442\u043e\u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0442\u0438\u043f\u043e\u0432, \u0442\u0430\u043a \u043a\u0430\u043a \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b \u0441\u0430\u0439\u0434 \u044d\u0444\u0444\u0435\u043a\u0442\u044b \u0441\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c.<\/p>\n\n\n\n<p class=\"has-large-font-size\"><strong>\u0421\u0442\u0440\u043e\u043a\u043e\u0432\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438<\/strong><\/p>\n\n\n\n<p>\u0412 PostgreSQL \u043c\u0430\u0441\u0441\u0430 <a href=\"https:\/\/www.postgresql.org\/docs\/current\/functions-string.html\">\u0441\u0442\u0440\u043e\u043a\u043e\u0432\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439<\/a>: \u043a\u043e\u043d\u043a\u0430\u0442\u0435\u043d\u0430\u0446\u0438\u044f, \u0434\u043b\u0438\u043d\u0430 \u0441\u0442\u0440\u043e\u043a\u0438, \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432, \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 \u043f\u043e \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u043c \u0438 \u0442.\u0434.<\/p>\n\n\n\n<p>\u041f\u0440\u0438\u043c\u0435\u0440\u044b \u0444\u0443\u043d\u043a\u0446\u0438\u0439:<\/p>\n\n\n\n<p><strong>right(string, n)<\/strong> &#8212; \u0434\u043e\u0441\u0442\u0430\u0442\u044c \u0442\u0435\u043a\u0441\u0442 \u0441\u043f\u0440\u0430\u0432\u0430. \u041f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0438\u0441\u0445\u043e\u0434\u043d\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 \u0438 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e. \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0441\u0442\u0440\u043e\u043a\u0443, \u0441\u043e\u0441\u0442\u043e\u044f\u0449\u0443\u044e \u0438\u0437 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438, \u0432\u0437\u044f\u0442\u044b\u0445 \u0441 \u043f\u0440\u0430\u0432\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"720\" height=\"77\" src=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/08\/image.png\" alt=\"\" class=\"wp-image-1242\" srcset=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/08\/image.png 720w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/08\/image-300x32.png 300w\" sizes=\"auto, (max-width: 720px) 100vw, 720px\" \/><\/figure>\n\n\n\n<p><strong>reverse(text)<\/strong> &#8212; \u0440\u0430\u0437\u0432\u043e\u0440\u043e\u0442 \u0441\u0442\u0440\u043e\u043a\u0438. \u041f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0438\u0441\u0445\u043e\u0434\u043d\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443. \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0435\u0451 \u0432 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0435.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"481\" height=\"78\" src=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/08\/image-1.png\" alt=\"\" class=\"wp-image-1243\" srcset=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/08\/image-1.png 481w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/08\/image-1-300x49.png 300w\" sizes=\"auto, (max-width: 481px) 100vw, 481px\" \/><\/figure>\n\n\n\n<p><strong>regexp_replace(string, pattern, replacement, flags)<\/strong> &#8212; \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435. \u041f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0438\u0441\u0445\u043e\u0434\u043d\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443, \u0437\u0430\u043c\u0435\u043d\u044f\u0435\u043c\u0443\u044e \u043f\u043e\u0434\u0441\u0442\u0440\u043e\u043a\u0443, \u0437\u0430\u043c\u0435\u043d\u0443 \u0438 \u0444\u043b\u0430\u0433\u0438. \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0438\u0432\u0448\u0443\u044e\u0441\u044f \u0441\u0442\u0440\u043e\u043a\u0443.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"80\" src=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/08\/image-2-1024x80.png\" alt=\"\" class=\"wp-image-1244\" srcset=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/08\/image-2-1024x80.png 1024w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/08\/image-2-300x24.png 300w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/08\/image-2-768x60.png 768w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/08\/image-2.png 1326w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>\u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <strong>substr()<\/strong> \u0434\u043e\u0441\u0442\u0430\u043d\u0435\u043c \u043f\u0435\u0440\u0432\u044b\u0435 \u0442\u0440\u0438 \u0441\u0438\u043c\u0432\u043e\u043b\u0430 \u0441\u0442\u0440\u043e\u043a\u0438:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT substr('4951234567',1,3);<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"182\" height=\"74\" src=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/08\/image-3.png\" alt=\"\" class=\"wp-image-1245\"\/><\/figure>\n\n\n\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0434\u043e\u0441\u0442\u0430\u043d\u0435\u043c \u043f\u043e\u0434\u0441\u0442\u0440\u043e\u043a\u0443, \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 \u0442\u0440\u0435\u0442\u044c\u0435\u0433\u043e \u0441\u0438\u043c\u0432\u043e\u043b\u0430, \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u044f \u043d\u043e\u043c\u0435\u0440\u043e\u043c \u0441\u0438\u043c\u0432\u043e\u043b\u0430 &#171;\u0434\u043b\u0438\u043d\u0430 \u0441\u0442\u0440\u043e\u043a\u0438 &#8212; 5&#187;:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT substr(' Eugene ',3,length(' Eugene ')-5);<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"168\" height=\"90\" src=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/08\/image-4.png\" alt=\"\" class=\"wp-image-1246\"\/><\/figure>\n\n\n\n<p>\u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <strong>trim()<\/strong> \u0443\u0431\u0435\u0440\u0435\u043c \u043b\u0438\u0448\u043d\u0438\u0435 \u043f\u0440\u043e\u0431\u0435\u043b\u044b:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT trim(' \u0415\u0432\u0433\u0435\u043d\u0438\u0439 ');<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"172\" height=\"95\" src=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/08\/image-5.png\" alt=\"\" class=\"wp-image-1247\"\/><\/figure>\n\n\n\n<p>\u041f\u043e\u0434\u0441\u0447\u0438\u0442\u0430\u0435\u043c \u0434\u043b\u0438\u043d\u0443 \u0441\u0442\u0440\u043e\u043a\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <strong>length()<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT length(' \u0415\u0432\u0433\u0435\u043d\u0438\u0439 ');<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"168\" height=\"81\" src=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/08\/image-6.png\" alt=\"\" class=\"wp-image-1248\"\/><\/figure>\n\n\n\n<p class=\"has-large-font-size\"><strong>\u0427\u0438\u0441\u043b\u043e\u0432\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438<\/strong><\/p>\n\n\n\n<p><a href=\"https:\/\/www.postgresql.org\/docs\/current\/functions-math.html\">\u0427\u0438\u0441\u043b\u043e\u0432\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439<\/a> \u0432 PostgreSQL \u0442\u043e\u0436\u0435 \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e.<\/p>\n\n\n\n<p>\u041f\u0440\u0438\u043c\u0435\u0440\u044b \u0444\u0443\u043d\u043a\u0446\u0438\u0439:<\/p>\n\n\n\n<p><strong>round(v, s)<\/strong> &#8212; \u043e\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u0438\u0435. \u041f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0447\u0438\u0441\u043b\u043e \u0438 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432. \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043e\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u043d\u044b\u0439 \u0432\u0438\u0434 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"726\" height=\"134\" src=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/08\/image-7.png\" alt=\"\" class=\"wp-image-1249\" srcset=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/08\/image-7.png 726w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/08\/image-7-300x55.png 300w\" sizes=\"auto, (max-width: 726px) 100vw, 726px\" \/><\/figure>\n\n\n\n<p><strong>abs(num)<\/strong> &#8212; \u043c\u043e\u0434\u0443\u043b\u044c. \u041f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0447\u0438\u0441\u043b\u043e. \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043c\u043e\u0434\u0443\u043b\u044c \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"371\" height=\"101\" src=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/08\/image-8.png\" alt=\"\" class=\"wp-image-1250\" srcset=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/08\/image-8.png 371w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/08\/image-8-300x82.png 300w\" sizes=\"auto, (max-width: 371px) 100vw, 371px\" \/><\/figure>\n\n\n\n<p class=\"has-large-font-size\"><strong>\u0424\u0443\u043d\u043a\u0446\u0438\u0438 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0434\u0430\u0442\u043e\u0439 \u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c<\/strong><\/p>\n\n\n\n<p>\u041f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 <a href=\"https:\/\/www.postgresql.org\/docs\/current\/functions-datetime.html\">\u0441 \u0434\u0430\u0442\u043e\u0439 \u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c<\/a> \u043e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 &#8212; \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u0444\u043e\u0440\u043c\u0430\u0442\u043e\u0432 \u0434\u0430\u0442\u044b. \u041f\u0440\u0438 \u0432\u044b\u0431\u043e\u0440\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043d\u0443\u0436\u043d\u043e \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c, \u043a\u0430\u043a\u043e\u0439 \u0432\u0438\u0434 \u0434\u0430\u0442\u044b \u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"604\" src=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/08\/image-9-1024x604.png\" alt=\"\" class=\"wp-image-1251\" srcset=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/08\/image-9-1024x604.png 1024w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/08\/image-9-300x177.png 300w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/08\/image-9-768x453.png 768w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/08\/image-9.png 1274w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>\u0414\u043e\u0441\u0442\u0430\u043d\u0435\u043c \u0438\u0437 \u0434\u0430\u0442\u044b \u0433\u043e\u0434 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <strong>extract()<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT EXTRACT(year from date '2024-05-25');<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"175\" height=\"91\" src=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/08\/image-10.png\" alt=\"\" class=\"wp-image-1252\"\/><\/figure>\n\n\n\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0434\u043e\u0441\u0442\u0430\u043d\u0435\u043c \u043c\u0435\u0441\u044f\u0446 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f <strong>date_part()<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT date_part('month','2024-05-25'::TIMESTAMP);<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"216\" height=\"95\" src=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/08\/image-11.png\" alt=\"\" class=\"wp-image-1253\"\/><\/figure>\n\n\n\n<p>\u0418 \u043a\u0432\u0430\u0440\u0442\u0430\u043b:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT date_part('quarter','2024-05-25'::TIMESTAMP);<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"211\" height=\"116\" src=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/08\/image-12.png\" alt=\"\" class=\"wp-image-1254\"\/><\/figure>\n\n\n\n<p>\u0410 \u043a\u0430\u043a \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c \u0433\u043e\u0434 \u043d\u0430 \u0442\u0440\u0438 \u0447\u0430\u0441\u0442\u0438? \u0422\u0430\u043a\u043e\u0439 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043d\u0435\u0442. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043d\u0430\u0431\u043e\u0440 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439.<\/p>\n\n\n\n<p>\u0412\u044b\u0447\u0438\u0441\u043b\u0438\u043c, \u043a\u0430\u043a\u043e\u0439 \u0442\u0440\u0435\u0442\u0438 \u0433\u043e\u0434\u0430 \u043f\u0440\u0438\u043d\u0430\u0434\u043b\u0435\u0436\u0438\u0442 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u0430\u044f \u0434\u0430\u0442\u0430. \u0412\u044b\u0447\u0442\u0435\u043c \u0438\u0437 \u043d\u043e\u043c\u0435\u0440\u0430 \u043c\u0435\u0441\u044f\u0446\u0430 \u0435\u0434\u0438\u043d\u0438\u0446\u0443, \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u043c \u043d\u0430 \u0447\u0435\u0442\u044b\u0440\u0435, \u043f\u0440\u0438\u0431\u0430\u0432\u0438\u043c \u0435\u0434\u0438\u043d\u0438\u0446\u0443 \u0438 \u043e\u043a\u0440\u0443\u0433\u043b\u0438\u043c \u0432\u043d\u0438\u0437:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT floor((date_part('month','2024-05-25'::TIMESTAMP)-1)\/4+1) AS v1;<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"152\" height=\"92\" src=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/08\/image-13.png\" alt=\"\" class=\"wp-image-1255\" srcset=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/08\/image-13.png 152w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/08\/image-13-150x92.png 150w\" sizes=\"auto, (max-width: 152px) 100vw, 152px\" \/><\/figure>\n\n\n\n<p>\u0414\u0440\u0443\u0433\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0442\u043e\u0439 \u0436\u0435 \u0437\u0430\u0434\u0430\u0447\u0438. \u041f\u0440\u0438\u0431\u0430\u0432\u0438\u043c \u043a \u043d\u043e\u043c\u0435\u0440\u0443 \u043c\u0435\u0441\u044f\u0446\u0430 \u0442\u0440\u0438, \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u043c \u043d\u0430 \u0447\u0435\u0442\u044b\u0440\u0435 \u0438 \u043e\u043a\u0440\u0443\u0433\u043b\u0438\u043c \u0432\u043d\u0438\u0437:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT floor((date_part('month','2024-05-25'::TIMESTAMP)+3)\/4) \nAS v2;<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"162\" height=\"82\" src=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/08\/image-14.png\" alt=\"\" class=\"wp-image-1256\"\/><\/figure>\n\n\n\n<p>\u0422\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u044c \u043d\u043e\u043c\u0435\u0440 \u043c\u0435\u0441\u044f\u0446\u0430 \u043d\u0430 \u0447\u0435\u0442\u044b\u0440\u0435 \u0438 \u043e\u043a\u0440\u0443\u0433\u043b\u0438\u0442\u044c \u0432\u0432\u0435\u0440\u0445:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT ceil((date_part('month','2024-05-25'::TIMESTAMP))\/4) \nAS v3;<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"144\" height=\"94\" src=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/08\/image-15.png\" alt=\"\" class=\"wp-image-1257\"\/><\/figure>\n\n\n\n<p>\u0415\u0449\u0451 \u043e\u0434\u0438\u043d \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0442\u0440\u0435\u0442\u044c \u0433\u043e\u0434\u0430 \u0447\u0435\u0440\u0435\u0437 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 <strong>CASE<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT CASE \n    WHEN '2024-05-25' IS NULL THEN 0\n    WHEN (date_part('month','2024-05-25'::TIMESTAMP))&lt;5 THEN 1\n    WHEN (date_part('month','2024-05-25'::TIMESTAMP))&lt;9 THEN 2\n    ELSE 3\nEND as test2;<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"175\" height=\"103\" src=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/08\/image-16.png\" alt=\"\" class=\"wp-image-1258\"\/><\/figure>\n\n\n\n<p>\u0412\u043e \u0432\u0441\u0435\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u0445 \u0431\u044b\u043b\u043e \u044f\u0432\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u043d\u043e \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0442\u0438\u043f\u0430 \u043a \u0434\u0430\u0442\u0435 &#171;<strong>::<\/strong>TIMESTAMP&#187; &#8212; \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0434\u0432\u043e\u0439\u043d\u043e\u0435 \u0434\u0432\u043e\u0435\u0442\u043e\u0447\u0438\u0435.<\/p>\n\n\n\n<p>\u0415\u0441\u043b\u0438 \u043d\u0435 \u0443\u043a\u0430\u0437\u0430\u0442\u044c, \u0442\u043e PostgreSQL \u043d\u0435 \u0441\u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0441\u0430\u043c &#8212; \u0430\u0432\u0442\u043e\u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043d\u0435 \u0441\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442:<\/p>\n\n\n\n<p>SELECT date_part(&#8216;month&#8217;,&#8217;2024-05-25&#8242;);<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"690\" height=\"174\" src=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/08\/image-17.png\" alt=\"\" class=\"wp-image-1259\" srcset=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/08\/image-17.png 690w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/08\/image-17-300x76.png 300w\" sizes=\"auto, (max-width: 690px) 100vw, 690px\" \/><\/figure>\n\n\n\n<p>\u0412\u044b\u0431\u043e\u0440 \u0442\u043e\u0439 \u0438\u043b\u0438 \u0438\u043d\u043e\u0439 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u043b\u0435\u0436\u0438\u0442 \u0432 \u0437\u043e\u043d\u0435 \u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n\n\n\n<p class=\"has-large-font-size\"><strong>\u0411\u0438\u043d\u0430\u0440\u043d\u044b\u0435  \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b<\/strong><\/p>\n\n\n\n<p>\u0411\u0438\u043d\u0430\u0440\u043d\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b &#8212; \u043e\u0434\u043d\u0438 \u0438\u0437 \u0441\u0430\u043c\u044b\u0445 \u0432\u0430\u0436\u043d\u044b\u0445, \u0442\u0430\u043a \u043a\u0430\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0432 \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u0445 \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 WHERE. \u0414\u0435\u043b\u044f\u0442\u0441\u044f \u043d\u0430 <a href=\"https:\/\/www.postgresql.org\/docs\/current\/functions-logical.html\">\u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438<\/a> \u0438 <a href=\"https:\/\/www.postgresql.org\/docs\/current\/functions-comparison.html\">\u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f<\/a>.<\/p>\n\n\n\n<p>\u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441\u043a\u043e\u0431\u043a\u0438 \u043f\u0440\u0438 \u0431\u043e\u043b\u044c\u0448\u043e\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0435 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432 \u0432 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0438 \u0432\u043e \u0438\u0437\u0431\u0435\u0436\u0430\u043d\u0438\u0435 \u043e\u0448\u0438\u0431\u043e\u043a \u0432 \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u0435 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"407\" height=\"477\" src=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/08\/image-18.png\" alt=\"\" class=\"wp-image-1260\" srcset=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/08\/image-18.png 407w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/08\/image-18-256x300.png 256w\" sizes=\"auto, (max-width: 407px) 100vw, 407px\" \/><\/figure>\n\n\n\n<p class=\"has-large-font-size\"><strong>\u0414\u0440\u0443\u0433\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438<\/strong><\/p>\n\n\n\n<p><a href=\"https:\/\/www.postgresql.org\/docs\/current\/functions.html\">\u0421\u043f\u0438\u0441\u043e\u043a \u0432\u0441\u0435\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438<\/a><\/p>\n\n\n\n<p>\u041f\u043e\u043c\u0438\u043c\u043e \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043d\u043d\u043e\u0433\u043e \u0432\u044b\u0448\u0435 <strong>CASE<\/strong>, \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u0438 <a href=\"https:\/\/www.postgresql.org\/docs\/current\/functions-conditional.html\">\u0434\u0440\u0443\u0433\u0438\u0435 \u0443\u0441\u043b\u043e\u0432\u043d\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b<\/a>, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 <strong>COALESCE<\/strong>.<\/p>\n\n\n\n<p>\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0441 \u0434\u0432\u0443\u043c\u044f \u043a\u043e\u043b\u043e\u043d\u043a\u0430\u043c\u0438:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>CREATE TABLE tbl (\n    t1 text, \n    t2 text\n);<\/code><\/pre>\n\n\n\n<p>\u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0432 \u043d\u0435\u0451 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>INSERT INTO tbl VALUES\n    (null, '2 column'),\n    ('1 column', null),\n    ('1','2'),\n    (null,null);<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"232\" height=\"157\" src=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/08\/image-21.png\" alt=\"\" class=\"wp-image-1263\"\/><\/figure>\n\n\n\n<p>\u041d\u0435\u043b\u044c\u0437\u044f \u043a\u043e\u043d\u043a\u0430\u0442\u0435\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0443 NULL \u0438 NOT NULL, \u0442\u0430\u043a \u043a\u0430\u043a \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0432\u0441\u0451 \u0440\u0430\u0432\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f NULL.<\/p>\n\n\n\n<p>\u041c\u043e\u0436\u043d\u043e \u0441\u043b\u043e\u0436\u0438\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0438 \u0447\u0435\u0440\u0435\u0437 CASE:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT *,\n    CASE WHEN t1 IS NULL AND t2 IS NULL\n        THEN 'NULL'\n    WHEN t1 IS NOT NULL AND t2 IS NOT NULL\n        THEN t1|| '|' ||t2\n    WHEN t1 IS NOT NULL\nTHEN t1\n    WHEN t2 IS NOT NULL\n        THEN t2\n    ELSE 'err'\nEND case\nFROM tbl;<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"319\" height=\"161\" src=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/08\/image-19.png\" alt=\"\" class=\"wp-image-1261\" srcset=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/08\/image-19.png 319w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/08\/image-19-300x151.png 300w\" sizes=\"auto, (max-width: 319px) 100vw, 319px\" \/><\/figure>\n\n\n\n<p>\u041b\u0438\u0431\u043e \u0447\u0435\u0440\u0435\u0437 COALESCE:<\/p>\n\n\n\n<p>SELECT *,<br>COALESCE(t1||&#8217;|&#8217;||t2,COALESCE(t1,COALESCE(t2,NULL)))<br>FROM tbl;<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"347\" height=\"164\" src=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/08\/image-20.png\" alt=\"\" class=\"wp-image-1262\" srcset=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/08\/image-20.png 347w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/08\/image-20-300x142.png 300w\" sizes=\"auto, (max-width: 347px) 100vw, 347px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>\u041f\u0440\u0435\u0437\u0435\u043d\u0442\u0430\u0446\u0438\u044f&nbsp;\u043a \u0441\u0442\u0430\u0442\u044c\u0435 <a href=\"https:\/\/github.com\/aeuge\/aristov_tech\/blob\/main\/00%20SQL%20s%200\/presentation\/00%2028%20SQL%20c%200.pdf\">\u0437\u0434\u0435\u0441\u044c<\/a>.<\/p>\n\n\n\n<p>29 \u0438\u0437 30 \u0442\u0435\u043c \u0431\u0443\u0434\u0435\u0442 \u0441\u043a\u043e\u0440\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430. \u0415\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u2013 \u043f\u0440\u0438\u0441\u043e\u0435\u0434\u0438\u043d\u044f\u0439\u0442\u0435\u0441\u044c \u043a \u043e\u043d\u043b\u0430\u0439\u043d \u0433\u0440\u0443\u043f\u043f\u0435, \u0441\u0441\u044b\u043b\u043a\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u0432&nbsp;<a href=\"https:\/\/aristov.tech\/blog\/kurs-sql-c-0\/\">\u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0438 \u043a\u0443\u0440\u0441\u0430<\/a>.<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0421\u0442\u0430\u0442\u044c\u044f \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0430 \u043d\u0430\u00a028 \u0432\u0438\u0434\u0435\u043e\u00a0\u0438\u0437 30 \u0442\u0435\u043c\u00a0\u043a\u0443\u0440\u0441\u0430 SQL c 0\u00a0\u043e\u0442 \u0410\u0440\u0438\u0441\u0442\u043e\u0432\u0430 \u0415\u0432\u0433\u0435\u043d\u0438\u044f. \u0421\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u0432\u0438\u0434\u0435\u043e \u043d\u0430 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430\u0445 RUTUBE \u0438 VK \u0432\u0438\u0434\u0435\u043e. \u0420\u0430\u043d\u0435\u0435 \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0443\u0436\u0435 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u043b\u0438 \u0442\u0438\u043f\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 PostgreSQL, \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u0443\u0437\u043d\u0430\u0435\u043c, \u043a\u0430\u043a \u0441 \u044d\u0442\u0438\u043c\u0438 \u0442\u0438\u043f\u0430\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c. \u0424\u0443\u043d\u043a\u0446\u0438\u0438 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0432 PostgreSQL \u0445\u043e\u0440\u043e\u0448\u043e \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u044b, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0431\u044b\u0441\u0442\u0440\u043e. \u041d\u043e \u043b\u0438\u0447\u043d\u043e \u043c\u043e\u0451 \u043c\u043d\u0435\u043d\u0438\u0435, [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[204,194],"tags":[319,326,324,325,323,16,320,321,322,318],"class_list":["post-1241","post","type-post","status-publish","format-standard","hentry","category-kurs-sql-s-0","category-obuchenie-postgresql","tag-case","tag-coalesce","tag-date_part","tag-extract","tag-length","tag-postgresql","tag-reverse","tag-substr","tag-trim","tag-funkczii"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>\u0424\u0443\u043d\u043a\u0446\u0438\u0438 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0432 PostgreSQL - \u0411\u043b\u043e\u0433 \u043f\u043e \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0435 \u0438 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 PostgreSQL \u043e\u0442 \u0410\u0440\u0438\u0441\u0442\u043e\u0432\u0430 \u0415\u0432\u0433\u0435\u043d\u0438\u044f<\/title>\n<meta name=\"description\" content=\"\u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u0442\u0438\u043f\u0430\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 - \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u044b\u043c\u0438, \u0447\u0438\u0441\u043b\u043e\u0432\u044b\u043c\u0438, \u0434\u0430\u0442\u043e\u0439 \u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c, \u0443\u0441\u043b\u043e\u0432\u043d\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b CASE \u0438 COALESCE.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/aristov.tech\/blog\/funkczii-dlya-raboty-s-dannymi-v-postgresql\/\" \/>\n<meta property=\"og:locale\" content=\"ru_RU\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u0424\u0443\u043d\u043a\u0446\u0438\u0438 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0432 PostgreSQL - \u0411\u043b\u043e\u0433 \u043f\u043e \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0435 \u0438 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 PostgreSQL \u043e\u0442 \u0410\u0440\u0438\u0441\u0442\u043e\u0432\u0430 \u0415\u0432\u0433\u0435\u043d\u0438\u044f\" \/>\n<meta property=\"og:description\" content=\"\u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u0442\u0438\u043f\u0430\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 - \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u044b\u043c\u0438, \u0447\u0438\u0441\u043b\u043e\u0432\u044b\u043c\u0438, \u0434\u0430\u0442\u043e\u0439 \u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c, \u0443\u0441\u043b\u043e\u0432\u043d\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b CASE \u0438 COALESCE.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/aristov.tech\/blog\/funkczii-dlya-raboty-s-dannymi-v-postgresql\/\" \/>\n<meta property=\"og:site_name\" content=\"\u0411\u043b\u043e\u0433 \u043f\u043e \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0435 \u0438 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 PostgreSQL \u043e\u0442 \u0410\u0440\u0438\u0441\u0442\u043e\u0432\u0430 \u0415\u0432\u0433\u0435\u043d\u0438\u044f\" \/>\n<meta property=\"article:published_time\" content=\"2024-11-27T06:25:42+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/08\/image.png\" \/>\n\t<meta property=\"og:image:width\" content=\"720\" \/>\n\t<meta property=\"og:image:height\" content=\"77\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Maria\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u041d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u0430\u0432\u0442\u043e\u0440\u043e\u043c\" \/>\n\t<meta name=\"twitter:data1\" content=\"Maria\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u041f\u0440\u0438\u043c\u0435\u0440\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 \u043c\u0438\u043d\u0443\u0442\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/funkczii-dlya-raboty-s-dannymi-v-postgresql\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/funkczii-dlya-raboty-s-dannymi-v-postgresql\\\/\"},\"author\":{\"name\":\"Maria\",\"@id\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/#\\\/schema\\\/person\\\/6a152749a3dde76f19cc30db676d2310\"},\"headline\":\"\u0424\u0443\u043d\u043a\u0446\u0438\u0438 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0432 PostgreSQL\",\"datePublished\":\"2024-11-27T06:25:42+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/funkczii-dlya-raboty-s-dannymi-v-postgresql\\\/\"},\"wordCount\":560,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/#\\\/schema\\\/person\\\/05f3a04bf720ae4bf25ac99c4248d5e7\"},\"image\":{\"@id\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/funkczii-dlya-raboty-s-dannymi-v-postgresql\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/08\\\/image.png\",\"keywords\":[\"case\",\"COALESCE\",\"date_part\",\"EXTRACT\",\"length\",\"postgresql\",\"reverse\",\"substr\",\"trim\",\"\u0444\u0443\u043d\u043a\u0446\u0438\u0438\"],\"articleSection\":[\"\u041a\u0443\u0440\u0441 SQL \u0441 0\",\"\u041e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 PostgreSQL\"],\"inLanguage\":\"ru-RU\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/aristov.tech\\\/blog\\\/funkczii-dlya-raboty-s-dannymi-v-postgresql\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/funkczii-dlya-raboty-s-dannymi-v-postgresql\\\/\",\"url\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/funkczii-dlya-raboty-s-dannymi-v-postgresql\\\/\",\"name\":\"\u0424\u0443\u043d\u043a\u0446\u0438\u0438 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0432 PostgreSQL - \u0411\u043b\u043e\u0433 \u043f\u043e \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0435 \u0438 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 PostgreSQL \u043e\u0442 \u0410\u0440\u0438\u0441\u0442\u043e\u0432\u0430 \u0415\u0432\u0433\u0435\u043d\u0438\u044f\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/funkczii-dlya-raboty-s-dannymi-v-postgresql\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/funkczii-dlya-raboty-s-dannymi-v-postgresql\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/08\\\/image.png\",\"datePublished\":\"2024-11-27T06:25:42+00:00\",\"description\":\"\u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u0442\u0438\u043f\u0430\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 - \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u044b\u043c\u0438, \u0447\u0438\u0441\u043b\u043e\u0432\u044b\u043c\u0438, \u0434\u0430\u0442\u043e\u0439 \u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c, \u0443\u0441\u043b\u043e\u0432\u043d\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b CASE \u0438 COALESCE.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/funkczii-dlya-raboty-s-dannymi-v-postgresql\\\/#breadcrumb\"},\"inLanguage\":\"ru-RU\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/aristov.tech\\\/blog\\\/funkczii-dlya-raboty-s-dannymi-v-postgresql\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"ru-RU\",\"@id\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/funkczii-dlya-raboty-s-dannymi-v-postgresql\\\/#primaryimage\",\"url\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/08\\\/image.png\",\"contentUrl\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/08\\\/image.png\",\"width\":720,\"height\":77},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/funkczii-dlya-raboty-s-dannymi-v-postgresql\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u0413\u043b\u0430\u0432\u043d\u0430\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430\",\"item\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u0424\u0443\u043d\u043a\u0446\u0438\u0438 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0432 PostgreSQL\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/\",\"name\":\"\u0411\u043b\u043e\u0433 \u043f\u043e \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0435 \u0438 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 PostgreSQL \u043e\u0442 \u0410\u0440\u0438\u0441\u0442\u043e\u0432\u0430 \u0415\u0432\u0433\u0435\u043d\u0438\u044f\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/#\\\/schema\\\/person\\\/05f3a04bf720ae4bf25ac99c4248d5e7\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ru-RU\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/#\\\/schema\\\/person\\\/05f3a04bf720ae4bf25ac99c4248d5e7\",\"name\":\"admin2\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ru-RU\",\"@id\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/05\\\/blog-logo.png\",\"url\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/05\\\/blog-logo.png\",\"contentUrl\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/05\\\/blog-logo.png\",\"width\":180,\"height\":180,\"caption\":\"admin2\"},\"logo\":{\"@id\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/05\\\/blog-logo.png\"},\"sameAs\":[\"https:\\\/\\\/aristov.tech\\\/blog\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/#\\\/schema\\\/person\\\/6a152749a3dde76f19cc30db676d2310\",\"name\":\"Maria\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ru-RU\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/a86c8edd49a73db805cc02e271f5fc126b109c146ad0d8976829c538b3b94ca4?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/a86c8edd49a73db805cc02e271f5fc126b109c146ad0d8976829c538b3b94ca4?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/a86c8edd49a73db805cc02e271f5fc126b109c146ad0d8976829c538b3b94ca4?s=96&d=mm&r=g\",\"caption\":\"Maria\"},\"url\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/author\\\/maria\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u0424\u0443\u043d\u043a\u0446\u0438\u0438 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0432 PostgreSQL - \u0411\u043b\u043e\u0433 \u043f\u043e \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0435 \u0438 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 PostgreSQL \u043e\u0442 \u0410\u0440\u0438\u0441\u0442\u043e\u0432\u0430 \u0415\u0432\u0433\u0435\u043d\u0438\u044f","description":"\u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u0442\u0438\u043f\u0430\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 - \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u044b\u043c\u0438, \u0447\u0438\u0441\u043b\u043e\u0432\u044b\u043c\u0438, \u0434\u0430\u0442\u043e\u0439 \u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c, \u0443\u0441\u043b\u043e\u0432\u043d\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b CASE \u0438 COALESCE.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/aristov.tech\/blog\/funkczii-dlya-raboty-s-dannymi-v-postgresql\/","og_locale":"ru_RU","og_type":"article","og_title":"\u0424\u0443\u043d\u043a\u0446\u0438\u0438 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0432 PostgreSQL - \u0411\u043b\u043e\u0433 \u043f\u043e \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0435 \u0438 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 PostgreSQL \u043e\u0442 \u0410\u0440\u0438\u0441\u0442\u043e\u0432\u0430 \u0415\u0432\u0433\u0435\u043d\u0438\u044f","og_description":"\u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u0442\u0438\u043f\u0430\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 - \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u044b\u043c\u0438, \u0447\u0438\u0441\u043b\u043e\u0432\u044b\u043c\u0438, \u0434\u0430\u0442\u043e\u0439 \u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c, \u0443\u0441\u043b\u043e\u0432\u043d\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b CASE \u0438 COALESCE.","og_url":"https:\/\/aristov.tech\/blog\/funkczii-dlya-raboty-s-dannymi-v-postgresql\/","og_site_name":"\u0411\u043b\u043e\u0433 \u043f\u043e \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0435 \u0438 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 PostgreSQL \u043e\u0442 \u0410\u0440\u0438\u0441\u0442\u043e\u0432\u0430 \u0415\u0432\u0433\u0435\u043d\u0438\u044f","article_published_time":"2024-11-27T06:25:42+00:00","og_image":[{"width":720,"height":77,"url":"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/08\/image.png","type":"image\/png"}],"author":"Maria","twitter_card":"summary_large_image","twitter_misc":{"\u041d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u0430\u0432\u0442\u043e\u0440\u043e\u043c":"Maria","\u041f\u0440\u0438\u043c\u0435\u0440\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f":"8 \u043c\u0438\u043d\u0443\u0442"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/aristov.tech\/blog\/funkczii-dlya-raboty-s-dannymi-v-postgresql\/#article","isPartOf":{"@id":"https:\/\/aristov.tech\/blog\/funkczii-dlya-raboty-s-dannymi-v-postgresql\/"},"author":{"name":"Maria","@id":"https:\/\/aristov.tech\/blog\/#\/schema\/person\/6a152749a3dde76f19cc30db676d2310"},"headline":"\u0424\u0443\u043d\u043a\u0446\u0438\u0438 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0432 PostgreSQL","datePublished":"2024-11-27T06:25:42+00:00","mainEntityOfPage":{"@id":"https:\/\/aristov.tech\/blog\/funkczii-dlya-raboty-s-dannymi-v-postgresql\/"},"wordCount":560,"commentCount":0,"publisher":{"@id":"https:\/\/aristov.tech\/blog\/#\/schema\/person\/05f3a04bf720ae4bf25ac99c4248d5e7"},"image":{"@id":"https:\/\/aristov.tech\/blog\/funkczii-dlya-raboty-s-dannymi-v-postgresql\/#primaryimage"},"thumbnailUrl":"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/08\/image.png","keywords":["case","COALESCE","date_part","EXTRACT","length","postgresql","reverse","substr","trim","\u0444\u0443\u043d\u043a\u0446\u0438\u0438"],"articleSection":["\u041a\u0443\u0440\u0441 SQL \u0441 0","\u041e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 PostgreSQL"],"inLanguage":"ru-RU","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/aristov.tech\/blog\/funkczii-dlya-raboty-s-dannymi-v-postgresql\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/aristov.tech\/blog\/funkczii-dlya-raboty-s-dannymi-v-postgresql\/","url":"https:\/\/aristov.tech\/blog\/funkczii-dlya-raboty-s-dannymi-v-postgresql\/","name":"\u0424\u0443\u043d\u043a\u0446\u0438\u0438 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0432 PostgreSQL - \u0411\u043b\u043e\u0433 \u043f\u043e \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0435 \u0438 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 PostgreSQL \u043e\u0442 \u0410\u0440\u0438\u0441\u0442\u043e\u0432\u0430 \u0415\u0432\u0433\u0435\u043d\u0438\u044f","isPartOf":{"@id":"https:\/\/aristov.tech\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/aristov.tech\/blog\/funkczii-dlya-raboty-s-dannymi-v-postgresql\/#primaryimage"},"image":{"@id":"https:\/\/aristov.tech\/blog\/funkczii-dlya-raboty-s-dannymi-v-postgresql\/#primaryimage"},"thumbnailUrl":"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/08\/image.png","datePublished":"2024-11-27T06:25:42+00:00","description":"\u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u0442\u0438\u043f\u0430\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 - \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u044b\u043c\u0438, \u0447\u0438\u0441\u043b\u043e\u0432\u044b\u043c\u0438, \u0434\u0430\u0442\u043e\u0439 \u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c, \u0443\u0441\u043b\u043e\u0432\u043d\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b CASE \u0438 COALESCE.","breadcrumb":{"@id":"https:\/\/aristov.tech\/blog\/funkczii-dlya-raboty-s-dannymi-v-postgresql\/#breadcrumb"},"inLanguage":"ru-RU","potentialAction":[{"@type":"ReadAction","target":["https:\/\/aristov.tech\/blog\/funkczii-dlya-raboty-s-dannymi-v-postgresql\/"]}]},{"@type":"ImageObject","inLanguage":"ru-RU","@id":"https:\/\/aristov.tech\/blog\/funkczii-dlya-raboty-s-dannymi-v-postgresql\/#primaryimage","url":"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/08\/image.png","contentUrl":"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/08\/image.png","width":720,"height":77},{"@type":"BreadcrumbList","@id":"https:\/\/aristov.tech\/blog\/funkczii-dlya-raboty-s-dannymi-v-postgresql\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u0413\u043b\u0430\u0432\u043d\u0430\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430","item":"https:\/\/aristov.tech\/blog\/"},{"@type":"ListItem","position":2,"name":"\u0424\u0443\u043d\u043a\u0446\u0438\u0438 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0432 PostgreSQL"}]},{"@type":"WebSite","@id":"https:\/\/aristov.tech\/blog\/#website","url":"https:\/\/aristov.tech\/blog\/","name":"\u0411\u043b\u043e\u0433 \u043f\u043e \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0435 \u0438 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 PostgreSQL \u043e\u0442 \u0410\u0440\u0438\u0441\u0442\u043e\u0432\u0430 \u0415\u0432\u0433\u0435\u043d\u0438\u044f","description":"","publisher":{"@id":"https:\/\/aristov.tech\/blog\/#\/schema\/person\/05f3a04bf720ae4bf25ac99c4248d5e7"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/aristov.tech\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ru-RU"},{"@type":["Person","Organization"],"@id":"https:\/\/aristov.tech\/blog\/#\/schema\/person\/05f3a04bf720ae4bf25ac99c4248d5e7","name":"admin2","image":{"@type":"ImageObject","inLanguage":"ru-RU","@id":"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2023\/05\/blog-logo.png","url":"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2023\/05\/blog-logo.png","contentUrl":"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2023\/05\/blog-logo.png","width":180,"height":180,"caption":"admin2"},"logo":{"@id":"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2023\/05\/blog-logo.png"},"sameAs":["https:\/\/aristov.tech\/blog"]},{"@type":"Person","@id":"https:\/\/aristov.tech\/blog\/#\/schema\/person\/6a152749a3dde76f19cc30db676d2310","name":"Maria","image":{"@type":"ImageObject","inLanguage":"ru-RU","@id":"https:\/\/secure.gravatar.com\/avatar\/a86c8edd49a73db805cc02e271f5fc126b109c146ad0d8976829c538b3b94ca4?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/a86c8edd49a73db805cc02e271f5fc126b109c146ad0d8976829c538b3b94ca4?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/a86c8edd49a73db805cc02e271f5fc126b109c146ad0d8976829c538b3b94ca4?s=96&d=mm&r=g","caption":"Maria"},"url":"https:\/\/aristov.tech\/blog\/author\/maria\/"}]}},"_links":{"self":[{"href":"https:\/\/aristov.tech\/blog\/wp-json\/wp\/v2\/posts\/1241","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/aristov.tech\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/aristov.tech\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/aristov.tech\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/aristov.tech\/blog\/wp-json\/wp\/v2\/comments?post=1241"}],"version-history":[{"count":3,"href":"https:\/\/aristov.tech\/blog\/wp-json\/wp\/v2\/posts\/1241\/revisions"}],"predecessor-version":[{"id":1404,"href":"https:\/\/aristov.tech\/blog\/wp-json\/wp\/v2\/posts\/1241\/revisions\/1404"}],"wp:attachment":[{"href":"https:\/\/aristov.tech\/blog\/wp-json\/wp\/v2\/media?parent=1241"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/aristov.tech\/blog\/wp-json\/wp\/v2\/categories?post=1241"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/aristov.tech\/blog\/wp-json\/wp\/v2\/tags?post=1241"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}