{"id":883,"date":"2024-07-06T16:18:00","date_gmt":"2024-07-06T13:18:00","guid":{"rendered":"https:\/\/aristov.tech\/blog\/?p=883"},"modified":"2024-10-07T14:57:53","modified_gmt":"2024-10-07T11:57:53","slug":"database-scheme-table-postgresql","status":"publish","type":"post","link":"https:\/\/aristov.tech\/blog\/database-scheme-table-postgresql\/","title":{"rendered":"Database Scheme Table 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\/2LesM4BION4\">\u043e\u0434\u0438\u043d\u043d\u0430\u0434\u0446\u0430\u0442\u043e\u043c \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\/323d7785af3e69828d35ddef9ee6aa18\/\">RUTUBE<\/a> \u0438 <a href=\"https:\/\/vk.com\/video-212716752_456239064\">VK \u0432\u0438\u0434\u0435\u043e<\/a>.<\/p>\n\n\n\n<p class=\"has-x-large-font-size\"><strong>\u0422\u0430\u0431\u043b\u0438\u0447\u043d\u043e\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/06\/image-3-1024x576.png\" alt=\"\" class=\"wp-image-888\" srcset=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/06\/image-3-1024x576.png 1024w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/06\/image-3-300x169.png 300w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/06\/image-3-768x432.png 768w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/06\/image-3-1536x864.png 1536w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/06\/image-3.png 1600w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>\u0412\u0441\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u0431\u0430\u0437 \u0434\u0430\u043d\u043d\u044b\u0445 \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0432 \u0442\u0430\u0431\u043b\u0438\u0447\u043d\u044b\u0445 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430\u0445. \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0435\u0441\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e pg_default, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u0442\u043e\u043c \u0436\u0435 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435, \u0447\u0442\u043e \u0438 \u043a\u043b\u0430\u0441\u0442\u0435\u0440 PostgreSQL. \u0422\u0430\u0431\u043b\u0438\u0447\u043d\u044b\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0438 \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e (\u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0438\u0441\u043a\u0438, \u0441\u0435\u0442\u0435\u0432\u044b\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0438 \u0442.\u0434.), \u0440\u0430\u0437\u043c\u0435\u0449\u0430\u0442\u044c \u0432 \u043d\u0438\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u044b. <\/p>\n\n\n\n<p>\u041e\u0431\u044a\u0435\u043a\u0442\u044b &#8212; \u0432\u0441\u0451, \u0447\u0442\u043e \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u044c\u043d\u043e \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f: \u0442\u0430\u0431\u043b\u0438\u0446\u044b, \u0438\u043d\u0434\u0435\u043a\u0441\u044b \u0438 \u0442.\u0434.<\/p>\n\n\n\n<p>\u0412 \u0440\u0430\u0437\u043d\u044b\u0435 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u043c\u043e\u0436\u043d\u043e \u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0434\u043d\u043e \u0438 \u0442\u043e \u0436\u0435 \u0442\u0430\u0431\u043b\u0438\u0447\u043d\u043e\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e, \u0442\u043e \u0435\u0441\u0442\u044c \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u0432 \u043e\u0434\u043d\u043e\u043c \u0442\u0430\u0431\u043b\u0438\u0447\u043d\u043e\u043c \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435.<\/p>\n\n\n\n<p>\u0422\u0430\u043a\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0432 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u043c \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 pg_catalog (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, pg_class) \u0438 \u043e\u0442\u043d\u043e\u0441\u044f\u0442\u0441\u044f \u043a\u043e \u0432\u0441\u0435\u043c \u0431\u0430\u0437\u0430\u043c \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435.<\/p>\n\n\n\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432. <\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/06\/image-4-1024x576.png\" alt=\"\" class=\"wp-image-889\" srcset=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/06\/image-4-1024x576.png 1024w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/06\/image-4-300x169.png 300w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/06\/image-4-768x432.png 768w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/06\/image-4-1536x864.png 1536w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/06\/image-4.png 1600w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>\u0412 \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u043c pg_default \u0435\u0441\u0442\u044c \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u0441 PostgreSQL, \u043a\u0430\u0442\u0430\u043b\u043e\u0433 base, \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 (\u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0439). <\/p>\n\n\n\n<p>\u0412 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 pg_tblspc \u043c\u043e\u0436\u043d\u043e \u0441\u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043b\u044e\u0431\u043e\u0439 \u0434\u0440\u0443\u0433\u043e\u0439 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 &#8212; \u0442\u0430\u043c \u0431\u0443\u0434\u0435\u0442 \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0434\u0438\u0441\u043a. \u042d\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0434\u043b\u044f \u0440\u0430\u0441\u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u0438\u0432\u0430\u043d\u0438\u044f \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438.<\/p>\n\n\n\n<p>\u0412\u0430\u0436\u043d\u043e, \u0447\u0442\u043e \u043e\u0434\u0438\u043d \u043e\u0431\u044a\u0435\u043a\u0442 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u043e\u0434\u043d\u043e\u043c \u043c\u0435\u0441\u0442\u0435 (\u0442\u0430\u0431\u043b\u0438\u0447\u043d\u043e\u043c \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435). \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u043f\u0435\u0440\u0435\u043d\u043e\u0441 \u0432\u043e\u0437\u043c\u043e\u0436\u0435\u043d, \u043d\u043e \u044d\u0442\u043e \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u0435\u0440\u0435\u043d\u043e\u0441 \u0444\u0430\u0439\u043b\u0430 (\u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u044d\u043a\u0441\u043a\u043b\u044e\u0437\u0438\u0432\u043d\u0430\u044f \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0430).<\/p>\n\n\n\n<p>\u0412\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0422\u041f: <\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u041e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u044b (\u0411\u0414, \u0442\u0430\u0431\u043b\u0438\u0446\u044b) \u0440\u0430\u0437\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u0422\u041f, \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0445 \u043d\u0430 \u0440\u0430\u0437\u043d\u044b\u0445 \u0434\u0438\u0441\u043a\u0430\u0445, \u0434\u0438\u0441\u043a\u043e\u0432\u044b\u0445 \u043c\u0430\u0441\u0441\u0438\u0432\u0430\u0445, \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0440\u0430\u0441\u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u0438\u0442\u044c \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0443<\/li>\n\n\n\n<li>\u0421\u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0447\u0430\u0441\u0442\u044c \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438 \u0447\u0430\u0441\u0442\u044c \u043a\u0430\u043a \u0444\u0430\u0439\u043b\u043e\u0432\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443, \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0422\u041f \u0438 \u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0442\u0430\u043c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f, \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b, \u0438\u043d\u0434\u0435\u043a\u0441\u044b &#8212; \u0442\u043e, \u0447\u0442\u043e \u043d\u0435 \u0441\u0442\u0440\u0430\u0448\u043d\u043e \u043f\u043e\u0442\u0435\u0440\u044f\u0442\u044c \u043f\u0440\u0438 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u0430. \u0425\u0440\u0430\u043d\u0438\u0442\u044c \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0435\u043b\u044c\u0437\u044f<\/li>\n\n\n\n<li>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440 ssd \u0434\u0438\u0441\u043a \u043f\u043e\u0434 \u0442\u0430\u043a\u0438\u0435 \u0436\u0435 \u043d\u0435\u043a\u0440\u0438\u0442\u0438\u0447\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435<\/li>\n<\/ul>\n\n\n\n<p class=\"has-x-large-font-size\"><strong>\u0423\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e PostgreSQL<\/strong><\/p>\n\n\n\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c <a href=\"https:\/\/aristov.tech\/blog\/logicheskoe-ustrojstv-postgresa\/\">\u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0441 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f. <\/a><\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/06\/image-5-1024x576.png\" alt=\"\" class=\"wp-image-890\" srcset=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/06\/image-5-1024x576.png 1024w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/06\/image-5-300x169.png 300w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/06\/image-5-768x432.png 768w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/06\/image-5-1536x864.png 1536w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/06\/image-5.png 1600w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>\u041d\u0430 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435 \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043e\u0432 PostgreSQL (\u043a\u043b\u0430\u0441\u0442\u0435\u0440 &#8212; \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u044b\u0439 \u0438\u043d\u0441\u0442\u0430\u043d\u0441 \u043d\u0430 \u043a\u0430\u043a\u043e\u043c-\u0442\u043e \u043f\u043e\u0440\u0442\u0443). \u0412\u043d\u0443\u0442\u0440\u0438 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0411\u0414, \u0430 \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u0430\u0436\u0434\u043e\u0439 \u0411\u0414 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0445\u0435\u043c. \u0412 \u043a\u0430\u0436\u0434\u043e\u0439 \u0441\u0445\u0435\u043c\u0435 \u0441\u0432\u043e\u0438 Relation (\u0442\u0430\u0431\u043b\u0438\u0446\u044b, \u0438\u043d\u0434\u0435\u043a\u0441\u044b \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u044b). \u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043e\u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432. \u0411\u0414, \u0441\u0445\u0435\u043c\u044b, Relation \u0438 \u0442\u0430\u0431\u043b\u0438\u0447\u043d\u044b\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 \u043e\u0442\u043d\u043e\u0441\u044f\u0442\u0441\u044f \u043a DDL &#8212; data definition language &#8212; \u044f\u0437\u044b\u043a, \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0449\u0438\u0439 \u0441\u0445\u0435\u043c\u0443 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n\n\n\n<p class=\"has-x-large-font-size\"><strong>Database<\/strong><\/p>\n\n\n\n<p>\u041e\u0442\u043d\u043e\u0441\u0438\u0442\u0441\u044f \u043a <a href=\"https:\/\/aristov.tech\/blog\/struktura-bd-ddl-v-pg\/\">DDL<\/a>.<\/p>\n\n\n\n<p>\u042f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u043c \u0441\u0430\u043c\u043e\u0433\u043e \u0432\u0435\u0440\u0445\u043d\u0435\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f \u0432 \u043b\u044e\u0431\u043e\u043c \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435. \u041d\u0435\u043b\u044c\u0437\u044f \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442, \u043d\u0435 \u043f\u0440\u0438\u043d\u0430\u0434\u043b\u0435\u0436\u0430\u0449\u0438\u0439 \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n\n\n\n<p>\u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0432 \u043b\u044e\u0431\u043e\u043c \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435 \u0435\u0441\u0442\u044c \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c 3 \u0411\u0414:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>postgresql (\u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u043c \u0441 \u043d\u0435\u0439)<\/li>\n\n\n\n<li>template0 <\/li>\n\n\n\n<li>template1<\/li>\n<\/ul>\n\n\n\n<p>\u041f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0438 \u043d\u0430 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u043c, \u0438 \u043d\u0430 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u0443\u0440\u043e\u0432\u043d\u0435. \u0422\u043e \u0435\u0441\u0442\u044c \u043a\u0430\u0436\u0434\u043e\u0439 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043a\u0430\u0442\u0430\u043b\u043e\u0433. <\/p>\n\n\n\n<p class=\"has-large-font-size\">postgres<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u041f\u0435\u0440\u0432\u0430\u044f \u0431\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b. \u0418\u043c\u0435\u0435\u0442 \u0442\u0430\u043a\u043e\u0435 \u0438\u043c\u044f, \u0442\u0430\u043a \u043a\u0430\u043a \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u043f\u043e \u0438\u043c\u0435\u043d\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.<\/li>\n\n\n\n<li>\u0421\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e<\/li>\n\n\n\n<li>\u0416\u0435\u043b\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c (\u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u0438 \u0411\u0414 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b), \u043d\u043e \u0438 \u043d\u0435 \u0443\u0434\u0430\u043b\u044f\u0442\u044c &#8212; \u0438\u043d\u043e\u0433\u0434\u0430 \u043e\u043d\u0430 \u043d\u0443\u0436\u043d\u0430 \u0434\u043b\u044f \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0443\u0442\u0438\u043b\u0438\u0442<\/li>\n<\/ul>\n\n\n\n<p class=\"has-large-font-size\">template0<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u041f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d \u0434\u043b\u044f \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0438\u0437 \u0440\u0435\u0437\u0435\u0440\u0432\u043d\u043e\u0439 \u043a\u043e\u043f\u0438\u0438<\/li>\n\n\n\n<li>\u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043d\u0435\u0442 \u043f\u0440\u0430\u0432 \u043d\u0430 connect (\u043c\u043e\u0436\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c, \u043d\u043e \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0435 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f)<\/li>\n\n\n\n<li>\u041b\u0443\u0447\u0448\u0435 \u0432\u0441\u0435\u0433\u043e \u043d\u0435 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0432 \u043d\u0435\u0439 \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432<\/li>\n<\/ul>\n\n\n\n<p class=\"has-large-font-size\">template1<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u0448\u0430\u0431\u043b\u043e\u043d \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043d\u043e\u0432\u044b\u0445 \u0431\u0430\u0437 \u0434\u0430\u043d\u043d\u044b\u0445<\/li>\n\n\n\n<li>\u0412 \u043d\u0435\u043c \u0438\u043c\u0435\u0435\u0442 \u0441\u043c\u044b\u0441\u043b \u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0435\u043a\u0438\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435 \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u0434\u0435\u043b\u0430\u0442\u044c \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437 \u043f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u043d\u043e\u0432\u044b\u0445 \u0431\u0430\u0437 \u0434\u0430\u043d\u043d\u044b\u0445. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, create extension \u0438\u043b\u0438 create schema<\/li>\n\n\n\n<li>\u041b\u0443\u0447\u0448\u0435 \u043d\u0435 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432, \u0442\u0430\u043a \u043a\u0430\u043a \u0434\u043b\u044f \u0434\u0440\u0443\u0433\u0438\u0445<\/li>\n\n\n\n<li>\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u043d\u0435\u043e\u0447\u0435\u0432\u0438\u0434\u043d\u043e<\/li>\n\n\n\n<li>\u041b\u0443\u0447\u0448\u0435 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u0432\u043e\u0439 \u0448\u0430\u0431\u043b\u043e\u043d \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0434\u0440\u0443\u0433\u0438\u0445 \u0411\u0414 (template2, template3 \u0438 \u0442.\u0434.)<\/li>\n<\/ul>\n\n\n\n<p class=\"has-large-font-size\">\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445<\/p>\n\n\n\n<p><a href=\"https:\/\/www.postgresql.org\/docs\/current\/sql-createdatabase.html\">CREATE DATABASE<\/a><\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"790\" height=\"478\" src=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/06\/image.png\" alt=\"\" class=\"wp-image-884\" srcset=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/06\/image.png 790w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/06\/image-300x182.png 300w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/06\/image-768x465.png 768w\" sizes=\"auto, (max-width: 790px) 100vw, 790px\" \/><\/figure>\n\n\n\n<p>\u0412 TEMPLATE \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0448\u0430\u0431\u043b\u043e\u043d \u0438\u0437 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445. \u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e IS_TEMPLATE \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u0432\u043e\u044e \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u043c. \u0415\u0441\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0437\u0430\u043f\u0440\u0435\u0442\u0438\u0442\u044c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f ALLOW_CONNECTIONS (\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432 \u0448\u0430\u0431\u043b\u043e\u043d\u0430\u0445).<\/p>\n\n\n\n<p>\u0411\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0435\u043b\u044c\u0437\u044f \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0432 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438. \u041f\u0440\u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0438 \u043a \u0434\u0440\u0443\u0433\u043e\u0439 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0442\u0435\u043a\u0443\u0449\u0430\u044f \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044f \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u0435\u0442\u0441\u044f. \u0412 \u0441\u0432\u044f\u0437\u0438 \u0441 \u044d\u0442\u0438\u043c \u0440\u0430\u0431\u043e\u0442\u0430 \u0441 \u0431\u0430\u0437\u043e\u0439 \u0434\u0430\u043d\u043d\u044b\u0445 (\u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435, \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435) \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0430\u043a\u043a\u0443\u0440\u0430\u0442\u043d\u043e\u0441\u0442\u0438.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>CREATE DATABASE aristov_tech - \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0411\u0414 <\/code><\/pre>\n\n\n\n<p class=\"has-x-large-font-size\"><strong>Scheme<\/strong><\/p>\n\n\n\n<p>\u0421\u0445\u0435\u043c\u0430 &#8212; \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f. \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0441\u0445\u0435\u043c\u0430 PUBLIC. <\/p>\n\n\n\n<p>\u0421\u0445\u0435\u043c\u0430 &#8212; \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0411\u0414 \u043d\u0430 \u0441\u0435\u0433\u043c\u0435\u043d\u0442\u044b.<\/p>\n\n\n\n<p>\u0412 \u0440\u0430\u0437\u043d\u044b\u0445 \u0441\u0445\u0435\u043c\u0430\u0445 \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u0441 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u043c\u0438 \u0438\u043c\u0435\u043d\u0430\u043c\u0438.<\/p>\n\n\n\n<p class=\"has-large-font-size\">\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0441\u0445\u0435\u043c\u044b<\/p>\n\n\n\n<p><a href=\"https:\/\/www.postgresql.org\/docs\/current\/sql-createschema.html\">CREATE SCHEMA<\/a><\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"993\" height=\"313\" src=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/06\/image-1.png\" alt=\"\" class=\"wp-image-886\" srcset=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/06\/image-1.png 993w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/06\/image-1-300x95.png 300w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/06\/image-1-768x242.png 768w\" sizes=\"auto, (max-width: 993px) 100vw, 993px\" \/><\/figure>\n\n\n\n<pre class=\"wp-block-code\"><code>CREATE SCHEMA eugene;<\/code><\/pre>\n\n\n\n<p>\u0415\u0441\u043b\u0438 \u0441\u0445\u0435\u043c\u0430 \u043d\u0435 \u0443\u043a\u0430\u0437\u0430\u043d\u043e \u044f\u0432\u043d\u043e, \u0442\u043e \u043e\u0431\u044a\u0435\u043a\u0442 \u0438\u0449\u0435\u0442\u0441\u044f \u0432\u043e \u0432\u0441\u0435\u0445 \u0441\u0445\u0435\u043c\u0430\u0445.<\/p>\n\n\n\n<p>\u0414\u043b\u044f \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0442\u0430\u0431\u043b\u0438\u0446 \u0441\u0445\u0435\u043c\u044b:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\\dt eugene.* (\u0443\u043a\u0430\u0437\u0430\u043d\u043e \u0438\u043c\u044f \u0441\u0445\u0435\u043c\u044b - eugene)<\/code><\/pre>\n\n\n\n<p class=\"has-x-large-font-size\"><strong>Table<\/strong><\/p>\n\n\n\n<p><a href=\"https:\/\/www.postgresql.org\/docs\/current\/sql-createtable.html\">CREATE TABLE<\/a><\/p>\n\n\n\n<p>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u0441\u0445\u0435\u043c\u044b:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>CREATE TABLE eugene.test (\n    i int\n);\n\\d+ eugene.test\n<img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"109\" class=\"wp-image-976\" style=\"width: 800px;\" src=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/06\/bez-imeni-1.png\" alt=\"\" srcset=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/06\/bez-imeni-1.png 1459w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/06\/bez-imeni-1-300x41.png 300w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/06\/bez-imeni-1-1024x140.png 1024w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/06\/bez-imeni-1-768x105.png 768w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/code><\/pre>\n\n\n\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u044b warehouse:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>DROP TABLE IF EXISTS warehouse CASCADE;\nCREATE TABLE warehouse (\n    id serial UNIQUE,\n    name text NOT NULL DEFAULT '',\n    kolvo int NOT NULL DEFAULT 0,\n    price decimal NOT NULL DEFAULT 0.0\n);<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"358\" height=\"441\" src=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/06\/image-8.png\" alt=\"\" class=\"wp-image-893\" style=\"width:132px;height:auto\" srcset=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/06\/image-8.png 358w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/06\/image-8-244x300.png 244w\" sizes=\"auto, (max-width: 358px) 100vw, 358px\" \/><\/figure>\n\n\n\n<p>\u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u0443\u0434\u0430\u043b\u044f\u0435\u043c \u0442\u0430\u0431\u043b\u0438\u0446\u0443, \u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0435\u0441\u043b\u0438 \u043e\u043d\u0430 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442. \u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e CASCADE \u0443\u0434\u0430\u043b\u044f\u044e\u0442\u0441\u044f \u0442\u0430\u043a\u0436\u0435 \u0432\u0441\u0435 \u0437\u0430\u0432\u0438\u0441\u044f\u0449\u0438\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b. \u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u0447\u0435\u043d\u044c \u0430\u043a\u043a\u0443\u0440\u0430\u0442\u043d\u043e, \u0442\u0430\u043a \u043a\u0430\u043a \u0443\u0434\u0430\u043b\u044f\u0442\u044c\u0441\u044f \u0432\u0441\u0435 \u0437\u0430\u0432\u0438\u0441\u044f\u0449\u0438\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b, \u0447\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u0432\u043b\u0435\u0447\u044c \u043f\u043e\u0442\u0435\u0440\u044e \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445. \u0422\u0430\u043a\u0436\u0435 \u043d\u0435\u043b\u044c\u0437\u044f \u0443\u0434\u0430\u043b\u044f\u0442\u044c \u0438 \u0437\u0430\u043d\u043e\u0432\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u043f\u0440\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0447\u0442\u043e-\u043b\u0438\u0431\u043e (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0442\u0438\u043f \u043f\u043e\u043b\u044f), \u0442\u0430\u043a \u043a\u0430\u043a \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043d\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f. \u041d\u0443\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u0443 ALTER.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>id &#8212; \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c, \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u043e\u043b\u0435<\/li>\n\n\n\n<li>name &#8212; \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0435, \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c NULL, \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043f\u0443\u0441\u0442\u043e\u0435<\/li>\n\n\n\n<li>kolvo &#8212; \u0446\u0435\u043b\u043e\u0435, \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c NULL, \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e 0<\/li>\n\n\n\n<li>price &#8212; \u0432\u0435\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435, \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c NULL, \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e 0.0<\/li>\n<\/ul>\n\n\n\n<p>Default \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f, \u043a\u043e\u0433\u0434\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043d\u0435 \u0437\u0430\u0434\u0430\u043b \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0440\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u0437\u0430\u043f\u0438\u0441\u0438<\/p>\n\n\n\n<p>\u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f \u0432\u0441\u0435 \u043f\u043e\u043b\u044f \u0434\u0435\u043b\u0430\u0442\u044c NOT NULL, \u0442\u0430\u043a \u043a\u0430\u043a \u0441 NULL \u043f\u043e\u043b\u0435\u043c \u0441\u043b\u043e\u0436\u043d\u0435\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c (NULL != NULL). \u0414\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 NULL \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f <strong><em>is NULL<\/em><\/strong>. \u041f\u0443\u0441\u0442\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430 &#8212; &#187; &#8212; \u044d\u0442\u043e \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u0430, \u0430 NULL &#8212; \u043d\u0435\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c &#187;=&#187; (\u043f\u0443\u0441\u0442\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430 \u0440\u0430\u0432\u043d\u0430 \u043f\u0443\u0441\u0442\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435). <\/p>\n\n\n\n<p>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b sales:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>DROP TABLE IF EXISTS sales;\nCREATE TABLE sales(\n    id serial PRIMARY KEY,\n    kolvo int NOT NULL,\n    summa numeric NOT NULL DEFAULT 0.0,\n    fk_warehouse int references warehouse(id) ON DELETE CASCADE,\n    salesDate date default current_date\n);<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>id &#8212; \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c, \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u043e\u043b\u0435<\/li>\n\n\n\n<li>kolvo &#8212; \u0446\u0435\u043b\u043e\u0435, \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c NULL<\/li>\n\n\n\n<li>summa &#8212; \u0432\u0435\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435, \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c NULL, \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e 0.0<\/li>\n\n\n\n<li>fk_warehouse &#8212; \u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u043a\u043b\u044e\u0447 \u043d\u0430 \u0442\u0430\u0431\u043b\u0438\u0446\u0443 warehouse<\/li>\n\n\n\n<li>salesDate &#8212; \u0434\u0430\u0442\u0430, \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0442\u0435\u043a\u0443\u0449\u0430\u044f \u0434\u0430\u0442\u0430<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"561\" height=\"297\" src=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/06\/image-9.png\" alt=\"\" class=\"wp-image-894\" style=\"width:342px;height:auto\" srcset=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/06\/image-9.png 561w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/06\/image-9-300x159.png 300w\" sizes=\"auto, (max-width: 561px) 100vw, 561px\" \/><\/figure>\n\n\n\n<p>\u0412\u0441\u0442\u0430\u0432\u0438\u043c \u0437\u0430\u043f\u0438\u0441\u0438 \u0432 \u0440\u0430\u0437\u043d\u044b\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0438 \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442:<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"444\" height=\"118\" src=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/06\/image-10.png\" alt=\"\" class=\"wp-image-895\" style=\"width:316px;height:auto\" srcset=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/06\/image-10.png 444w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/06\/image-10-300x80.png 300w\" sizes=\"auto, (max-width: 444px) 100vw, 444px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"633\" height=\"100\" src=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/06\/image-11.png\" alt=\"\" class=\"wp-image-896\" style=\"width:456px;height:auto\" srcset=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/06\/image-11.png 633w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/06\/image-11-300x47.png 300w\" sizes=\"auto, (max-width: 633px) 100vw, 633px\" \/><\/figure>\n\n\n\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u043c, \u0447\u0442\u043e \u0431\u0443\u0434\u0435\u0442, \u0435\u0441\u043b\u0438 \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0437\u0430\u043f\u0438\u0441\u044c \u0441 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u044b\u043c id:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>INSERT INTO warehouse(<em>id<\/em>, name) VALUES \n    (1, 'soap');<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"440\" height=\"91\" src=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/06\/image-12.png\" alt=\"\" class=\"wp-image-897\" style=\"width:532px;height:auto\" srcset=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/06\/image-12.png 440w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/06\/image-12-300x62.png 300w\" sizes=\"auto, (max-width: 440px) 100vw, 440px\" \/><\/figure>\n\n\n\n<p>\u0421\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u0438\u043c \u043f\u0440\u043e\u0434\u0430\u0436\u0438 \u0441 \u0442\u043e\u0432\u0430\u0440\u0430\u043c\u0438:<\/p>\n\n\n\n<p>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u043f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u0442\u0430\u0431\u043b\u0438\u0446 \u043d\u0435 \u0431\u044b\u043b\u0430 \u0443\u043a\u0430\u0437\u0430\u043d\u0430 \u0441\u0445\u0435\u043c\u0430, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043e\u043d\u0438 \u0431\u044b\u043b\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u044b \u0432 PUBLIC. \u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u043e\u0432\u0430\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u0438\u0445 \u0441\u0445\u0435\u043c\u044b \u0434\u0430\u043d\u043d\u044b\u0445, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c public \u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u043c.<\/p>\n\n\n\n<p class=\"has-x-large-font-size\"><strong>Relation<\/strong><\/p>\n\n\n\n<p class=\"has-large-font-size\"><a href=\"https:\/\/www.postgresql.org\/docs\/15\/catalog-pg-class.html\">\u0412\u0438\u0434\u044b RELATION<\/a> \u0432 \u0411\u0414<\/p>\n\n\n\n<p>r = ordinary table<br>\u041a\u0440\u043e\u043c\u0435 \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u0442\u0430\u0431\u043b\u0438\u0446, \u0442\u0430\u043a\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u044f:<br>i = index,<br>S = sequence,<br>v = view,<br>m = materialized view,<br>c = composite type,<br>t = TOAST table,<br>f = foreign table<\/p>\n\n\n\n<p>\u041a\u0430\u0436\u0434\u043e\u043c\u0443 Relation \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u043d\u0430 \u0434\u0438\u0441\u043a\u0435.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/06\/image-6-1024x576.png\" alt=\"\" class=\"wp-image-891\" srcset=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/06\/image-6-1024x576.png 1024w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/06\/image-6-300x169.png 300w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/06\/image-6-768x432.png 768w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/06\/image-6-1536x864.png 1536w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/06\/image-6.png 1600w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>\u041f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 (<a href=\"https:\/\/aristov.tech\/blog\/podklyuchenie-k-klasteru\/\">\u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u0432 \u0441\u0442\u0430\u0442\u044c\u0435<\/a>): <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>show hba_file;\nshow config_file;\nshow data_directory;<\/code><\/pre>\n\n\n\n<p>\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043e\u0431\u044a\u0435\u043a\u0442 \u0438 \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0435\u0433\u043e \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>CREATE TABLE test5(\n    i int\n);\nSELECT pg_relation_filepath('test5');<\/code><\/pre>\n\n\n\n<p>\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0440\u0438\u043c\u0435\u0440 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0441\u0432\u043e\u0435\u0433\u043e \u0442\u0430\u0431\u043b\u0438\u0447\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430.<\/p>\n\n\n\n<p>\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0441\u0432\u043e\u0451 \u0442\u0430\u0431\u043b\u0438\u0447\u043d\u043e\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e \u0432 \u0434\u043e\u043c\u0430\u0448\u043d\u0435\u043c \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f postgres \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo su postgres\ncd ~\nmkdir temp_tblspce\nCREATE TABLESPACE ts location '\/var\/lib\/postgresql\/temp_tblspce';<\/code><\/pre>\n\n\n\n<p>\u041d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u044e, \u0447\u0442\u043e \u0442\u0430\u0431\u043b\u0438\u0447\u043d\u043e\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u043b\u044e\u0431\u043e \u0434\u0438\u0441\u043a, \u0440\u0430\u0441\u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u0438\u0432 \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0440\u0430\u0431\u043e\u0442\u0443.<\/p>\n\n\n\n<p>\u041f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u0435 (\u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u043e\u0435) \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u0432 \u0434\u0440\u0443\u0433\u043e\u0435 \u0422\u041f:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>CREATE TABLE test2 (\n    i int\n) \nTABLESPACE pg_default;<\/code><\/pre>\n\n\n\n<p>\u041b\u0443\u0447\u0448\u0435 \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u0433\u0440\u0430\u043c\u043e\u0442\u043d\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0431\u0430\u0437\u0443, \u0442\u0430\u043a \u043a\u0430\u043a \u043f\u0435\u0440\u0435\u043d\u043e\u0441 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u0432\u0440\u0435\u043c\u044f, \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u0438 \u044d\u043a\u0441\u043a\u043b\u044e\u0437\u0438\u0432\u043d\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u0430.<\/p>\n\n\n\n<p>\u041f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0431\u0430\u0437\u044b:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT pg_database_size('app');<\/code><\/pre>\n\n\n\n<p>\u0414\u043b\u044f \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u0438\u044f \u0432\u043e\u0441\u043f\u0440\u0438\u044f\u0442\u0438\u044f \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0432\u0435\u0441\u0442\u0438 \u0447\u0438\u0441\u043b\u043e \u0432 \u043e\u0442\u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u043c \u0432\u0438\u0434\u0435:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT pg_size_pretty(pg_database_size('app'));<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"705\" height=\"290\" src=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/06\/image-2.png\" alt=\"\" class=\"wp-image-887\" style=\"width:440px;height:auto\" srcset=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/06\/image-2.png 705w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/06\/image-2-300x123.png 300w\" sizes=\"auto, (max-width: 705px) 100vw, 705px\" \/><\/figure>\n\n\n\n<p>\u041f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT pg_size_pretty(pg_indexes_size('test2'));<\/code><\/pre>\n\n\n\n<p>\u041f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 default \u0442\u0430\u0431\u043b\u0438\u0447\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT count(*) \nFROM pg_class \nWHERE reltablespace = 0;<\/code><\/pre>\n\n\n\n<p>\u041f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u0441\u0445\u0435\u043c \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e (\u0432 \u0434\u0430\u043d\u043d\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0443\u043a\u0430\u0437\u0430\u043d\u0430 \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u0438\u0441\u043a\u0430 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432):<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><span style=\"color: rgb(26, 26, 26); font-family: &quot;YS Text&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-size: 15px; white-space-collapse: collapse;\">SHOW&nbsp;<\/span><span style=\"background-color: initial; font-family: inherit; font-size: inherit; color: rgb(26, 26, 26);\">search_path<\/span>;<\/code><\/pre>\n\n\n\n<p>\u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f \u0432\u0441\u0435\u0433\u0434\u0430 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0441\u0445\u0435\u043c\u0443, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442\u0435, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0431\u044b\u043b\u043e \u0440\u0430\u0437\u043d\u043e\u0447\u0442\u0435\u043d\u0438\u0439<\/p>\n\n\n\n<p class=\"has-x-large-font-size\"><strong><a href=\"https:\/\/www.postgresql.org\/docs\/current\/ddl-constraints.html\">Constraint<\/a><\/strong> \u0438\u043b\u0438 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f<\/p>\n\n\n\n<p>\u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f \u0432\u0441\u0435\u0433\u0434\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c NOT NULL<\/p>\n\n\n\n<p>UNIQUE \u0432\u043d\u0443\u0442\u0440\u0438 \u0441\u0435\u0431\u044f \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0438\u043d\u0434\u0435\u043a\u0441<\/p>\n\n\n\n<p>PRIMARY KEY \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043a\u0430\u0441\u043a\u0430\u0434\u0430\u043c\u0438<\/p>\n\n\n\n<p>CHECK &#8212; \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0446\u0435\u043d\u0430 \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0443\u043b\u044f. \u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f \u043e\u0442\u0434\u0430\u0432\u0430\u0442\u044c \u043d\u0430 \u0431\u044d\u043a\u0435\u043d\u0434.<\/p>\n\n\n\n<p>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e\u0431 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f\u0445 <a href=\"https:\/\/aristov.tech\/blog\/osnovy-postgresql\/\">\u0437\u0434\u0435\u0441\u044c<\/a>.<\/p>\n\n\n\n<p class=\"has-x-large-font-size\"><strong>\u0418\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432<\/strong><\/p>\n\n\n\n<p>\u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u0430\u0432\u0430\u0442\u044c \u0438\u043d\u0442\u0443\u0438\u0442\u0438\u0432\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u0435 \u0438\u043c\u0435\u043d\u0430 \u043e\u0431\u044a\u0435\u043a\u0442\u0430\u043c<\/p>\n\n\n\n<p>PostgreSQL \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0442\u0435\u043a\u0441\u0442 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u043d\u0438\u0436\u043d\u0435\u043c\u0443 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0443.<\/p>\n\n\n\n<p>\u0414\u0432\u0430 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430 \u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u044f:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>camelCase -&gt; camelcase<\/li>\n\n\n\n<li>snake_case -&gt; snake_case<\/li>\n<\/ul>\n\n\n\n<p>\u041c\u043e\u0436\u043d\u043e, \u043d\u043e \u043a\u0440\u0430\u0439\u043d\u0435 \u043d\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 \u043a\u0430\u0432\u044b\u0447\u043a\u0438 (\u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442\u0441\u044f \u0440\u0435\u0433\u0438\u0441\u0442\u0440, \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0440\u0443\u0441\u0441\u043a\u0438\u0439 \u0438 \u043f\u0440\u043e\u0431\u0435\u043b\u044b) &#8212; \u0442\u043e\u0433\u0434\u0430 \u0438\u043c\u044f \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u043e \u043a\u0430\u043a \u0432 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u0435: &#171;camelCase&#187; -&gt; &#171;camelCase&#187; \u0438 \u0432\u0441\u0435\u0433\u0434\u0430 \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u0432\u044b\u0447\u043a\u0438 \u0438 \u0442\u043e \u0436\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435.<\/p>\n\n\n\n<p class=\"has-x-large-font-size\"><strong>DEFAULT vs IDENTITY<\/strong><\/p>\n\n\n\n<p>\u041a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0439 SERIAL -&gt; INT NOT NULL DEFAULT(nextval(\u2018test_i_seq\u2019))<\/p>\n\n\n\n<p>CREATE TABLE color (<br>&nbsp;&nbsp;&nbsp; color_id SERIAL,<br>&nbsp;&nbsp;&nbsp; color_name VARCHAR NOT NULL<br>);<\/p>\n\n\n\n<p>\u041d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 10 \u0432\u0435\u0440\u0441\u0438\u0438 \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 <a href=\"https:\/\/www.postgresqltutorial.com\/postgresql-tutorial\/postgresql-identity-column\/\">IDENTITY<\/a><\/p>\n\n\n\n<p>CREATE TABLE color (<br>&nbsp;&nbsp;&nbsp; color_id INT GENERATED ALWAYS AS IDENTITY,<br>&nbsp;&nbsp;&nbsp; color_name VARCHAR NOT NULL<br>);<\/p>\n\n\n\n<p>\u041e\u0442\u043b\u0438\u0447\u0438\u0435 \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e IDENTITY \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b, \u0430 SERIAL &#8212; \u043a\u0430\u043a \u0441\u043a\u0432\u043e\u0437\u043d\u0443\u044e \u043d\u0443\u043c\u0435\u0440\u0430\u0446\u0438\u044e \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u0445.<\/p>\n\n\n\n<p>\u041e\u0431\u0430 \u0441\u043f\u043e\u0441\u043e\u0431\u0430 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u044b \u043d\u0430 SEQUENCE.<\/p>\n\n\n\n<p><a href=\"https:\/\/github.com\/aeuge\/aristov_tech\/blob\/main\/00%20SQL%20s%200\/presentation\/00%2011%20SQL%20c%200.pdf\">\u041f\u0440\u0435\u0437\u0435\u043d\u0442\u0430\u0446\u0438\u044f<\/a> \u0438 <a href=\"https:\/\/github.com\/aeuge\/aristov_tech\/blob\/main\/00%20SQL%20s%200\/ishod\/00%2011%20DDL.txt\">\u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438<\/a> \u043a \u0441\u0442\u0430\u0442\u044c\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u043d\u0430 github.<\/p>\n\n\n\n<p>12 \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","protected":false},"excerpt":{"rendered":"<p>\u0421\u0442\u0430\u0442\u044c\u044f \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0430 \u043d\u0430\u00a0\u043e\u0434\u0438\u043d\u043d\u0430\u0434\u0446\u0430\u0442\u043e\u043c \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. \u0422\u0430\u0431\u043b\u0438\u0447\u043d\u043e\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e \u0412\u0441\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u0431\u0430\u0437 \u0434\u0430\u043d\u043d\u044b\u0445 \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0432 \u0442\u0430\u0431\u043b\u0438\u0447\u043d\u044b\u0445 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430\u0445. \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0435\u0441\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e pg_default, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u0442\u043e\u043c \u0436\u0435 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435, \u0447\u0442\u043e \u0438 \u043a\u043b\u0430\u0441\u0442\u0435\u0440 PostgreSQL. \u0422\u0430\u0431\u043b\u0438\u0447\u043d\u044b\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0438 \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e (\u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0438\u0441\u043a\u0438, \u0441\u0435\u0442\u0435\u0432\u044b\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 [&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":[252,250,16,251,248,249,15,136],"class_list":["post-883","post","type-post","status-publish","format-standard","hentry","category-kurs-sql-s-0","category-obuchenie-postgresql","tag-constraint","tag-hba_file","tag-postgresql","tag-relation","tag-scheme","tag-table","tag-tablespace","tag-template0"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Database Scheme Table 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=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/aristov.tech\/blog\/database-scheme-table-postgresql\/\" \/>\n<meta property=\"og:locale\" content=\"ru_RU\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Database Scheme Table 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=\"\u0421\u0442\u0430\u0442\u044c\u044f \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0430 \u043d\u0430\u00a0\u043e\u0434\u0438\u043d\u043d\u0430\u0434\u0446\u0430\u0442\u043e\u043c \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. \u0422\u0430\u0431\u043b\u0438\u0447\u043d\u043e\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e \u0412\u0441\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u0431\u0430\u0437 \u0434\u0430\u043d\u043d\u044b\u0445 \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0432 \u0442\u0430\u0431\u043b\u0438\u0447\u043d\u044b\u0445 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430\u0445. \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0435\u0441\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e pg_default, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u0442\u043e\u043c \u0436\u0435 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435, \u0447\u0442\u043e \u0438 \u043a\u043b\u0430\u0441\u0442\u0435\u0440 PostgreSQL. \u0422\u0430\u0431\u043b\u0438\u0447\u043d\u044b\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0438 \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e (\u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0438\u0441\u043a\u0438, \u0441\u0435\u0442\u0435\u0432\u044b\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/aristov.tech\/blog\/database-scheme-table-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-07-06T13:18:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-10-07T11:57:53+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/06\/image-3-1024x576.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=\"9 \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\\\/database-scheme-table-postgresql\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/database-scheme-table-postgresql\\\/\"},\"author\":{\"name\":\"Maria\",\"@id\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/#\\\/schema\\\/person\\\/6a152749a3dde76f19cc30db676d2310\"},\"headline\":\"Database Scheme Table PostgreSQL\",\"datePublished\":\"2024-07-06T13:18:00+00:00\",\"dateModified\":\"2024-10-07T11:57:53+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/database-scheme-table-postgresql\\\/\"},\"wordCount\":1206,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/#\\\/schema\\\/person\\\/05f3a04bf720ae4bf25ac99c4248d5e7\"},\"image\":{\"@id\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/database-scheme-table-postgresql\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/06\\\/image-3-1024x576.png\",\"keywords\":[\"constraint\",\"hba_file\",\"postgresql\",\"relation\",\"scheme\",\"table\",\"tablespace\",\"template0\"],\"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\\\/database-scheme-table-postgresql\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/database-scheme-table-postgresql\\\/\",\"url\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/database-scheme-table-postgresql\\\/\",\"name\":\"Database Scheme Table 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\\\/database-scheme-table-postgresql\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/database-scheme-table-postgresql\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/06\\\/image-3-1024x576.png\",\"datePublished\":\"2024-07-06T13:18:00+00:00\",\"dateModified\":\"2024-10-07T11:57:53+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/database-scheme-table-postgresql\\\/#breadcrumb\"},\"inLanguage\":\"ru-RU\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/aristov.tech\\\/blog\\\/database-scheme-table-postgresql\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"ru-RU\",\"@id\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/database-scheme-table-postgresql\\\/#primaryimage\",\"url\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/06\\\/image-3.png\",\"contentUrl\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/06\\\/image-3.png\",\"width\":1600,\"height\":900},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/database-scheme-table-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\":\"Database Scheme Table 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":"Database Scheme Table 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","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\/database-scheme-table-postgresql\/","og_locale":"ru_RU","og_type":"article","og_title":"Database Scheme Table 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":"\u0421\u0442\u0430\u0442\u044c\u044f \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0430 \u043d\u0430\u00a0\u043e\u0434\u0438\u043d\u043d\u0430\u0434\u0446\u0430\u0442\u043e\u043c \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. \u0422\u0430\u0431\u043b\u0438\u0447\u043d\u043e\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e \u0412\u0441\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u0431\u0430\u0437 \u0434\u0430\u043d\u043d\u044b\u0445 \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0432 \u0442\u0430\u0431\u043b\u0438\u0447\u043d\u044b\u0445 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430\u0445. \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0435\u0441\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e pg_default, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u0442\u043e\u043c \u0436\u0435 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435, \u0447\u0442\u043e \u0438 \u043a\u043b\u0430\u0441\u0442\u0435\u0440 PostgreSQL. \u0422\u0430\u0431\u043b\u0438\u0447\u043d\u044b\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0438 \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e (\u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0438\u0441\u043a\u0438, \u0441\u0435\u0442\u0435\u0432\u044b\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 [&hellip;]","og_url":"https:\/\/aristov.tech\/blog\/database-scheme-table-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-07-06T13:18:00+00:00","article_modified_time":"2024-10-07T11:57:53+00:00","og_image":[{"url":"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/06\/image-3-1024x576.png","type":"","width":"","height":""}],"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":"9 \u043c\u0438\u043d\u0443\u0442"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/aristov.tech\/blog\/database-scheme-table-postgresql\/#article","isPartOf":{"@id":"https:\/\/aristov.tech\/blog\/database-scheme-table-postgresql\/"},"author":{"name":"Maria","@id":"https:\/\/aristov.tech\/blog\/#\/schema\/person\/6a152749a3dde76f19cc30db676d2310"},"headline":"Database Scheme Table PostgreSQL","datePublished":"2024-07-06T13:18:00+00:00","dateModified":"2024-10-07T11:57:53+00:00","mainEntityOfPage":{"@id":"https:\/\/aristov.tech\/blog\/database-scheme-table-postgresql\/"},"wordCount":1206,"commentCount":0,"publisher":{"@id":"https:\/\/aristov.tech\/blog\/#\/schema\/person\/05f3a04bf720ae4bf25ac99c4248d5e7"},"image":{"@id":"https:\/\/aristov.tech\/blog\/database-scheme-table-postgresql\/#primaryimage"},"thumbnailUrl":"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/06\/image-3-1024x576.png","keywords":["constraint","hba_file","postgresql","relation","scheme","table","tablespace","template0"],"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\/database-scheme-table-postgresql\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/aristov.tech\/blog\/database-scheme-table-postgresql\/","url":"https:\/\/aristov.tech\/blog\/database-scheme-table-postgresql\/","name":"Database Scheme Table 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\/database-scheme-table-postgresql\/#primaryimage"},"image":{"@id":"https:\/\/aristov.tech\/blog\/database-scheme-table-postgresql\/#primaryimage"},"thumbnailUrl":"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/06\/image-3-1024x576.png","datePublished":"2024-07-06T13:18:00+00:00","dateModified":"2024-10-07T11:57:53+00:00","breadcrumb":{"@id":"https:\/\/aristov.tech\/blog\/database-scheme-table-postgresql\/#breadcrumb"},"inLanguage":"ru-RU","potentialAction":[{"@type":"ReadAction","target":["https:\/\/aristov.tech\/blog\/database-scheme-table-postgresql\/"]}]},{"@type":"ImageObject","inLanguage":"ru-RU","@id":"https:\/\/aristov.tech\/blog\/database-scheme-table-postgresql\/#primaryimage","url":"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/06\/image-3.png","contentUrl":"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/06\/image-3.png","width":1600,"height":900},{"@type":"BreadcrumbList","@id":"https:\/\/aristov.tech\/blog\/database-scheme-table-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":"Database Scheme Table 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\/883","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=883"}],"version-history":[{"count":9,"href":"https:\/\/aristov.tech\/blog\/wp-json\/wp\/v2\/posts\/883\/revisions"}],"predecessor-version":[{"id":1384,"href":"https:\/\/aristov.tech\/blog\/wp-json\/wp\/v2\/posts\/883\/revisions\/1384"}],"wp:attachment":[{"href":"https:\/\/aristov.tech\/blog\/wp-json\/wp\/v2\/media?parent=883"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/aristov.tech\/blog\/wp-json\/wp\/v2\/categories?post=883"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/aristov.tech\/blog\/wp-json\/wp\/v2\/tags?post=883"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}