{"id":186,"date":"2023-07-16T11:19:08","date_gmt":"2023-07-16T08:19:08","guid":{"rendered":"https:\/\/aristov.tech\/blog\/?p=186"},"modified":"2024-02-07T15:47:46","modified_gmt":"2024-02-07T12:47:46","slug":"struktura-bd-ddl-v-pg","status":"publish","type":"post","link":"https:\/\/aristov.tech\/blog\/struktura-bd-ddl-v-pg\/","title":{"rendered":"\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0411\u0414 (DDL) \u0432 PostgreSQL"},"content":{"rendered":"\n<p>\u0412 <a href=\"https:\/\/aristov.tech\/blog\/logicheskoe-ustrojstv-postgresa\/\">\u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435<\/a> \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043b\u0438 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 PostgreSQL \u0438 \u0432\u0438\u0434\u0435\u043b\u0438, \u0447\u0442\u043e \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u043c \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u043c \u0432\u0435\u0440\u0445\u043d\u0435\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0411\u0430\u0437\u0430 \u0414\u0430\u043d\u043d\u044b\u0445, \u0434\u0430\u043b\u0435\u0435 \u0438\u0434\u0435\u0442 \u0441\u0445\u0435\u043c\u0430 \u0438 \u0432 \u043d\u0435\u0439 \u0443\u0436\u0435 \u0441\u043e\u0437\u0434\u0430\u044e\u0442\u0441\u044f \u0434\u0440\u0443\u0433\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u044b. \u0421\u0445\u0435\u043c\u043e\u0439 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u0445\u0435\u043c\u0430 public. \u0418\u043c\u0435\u043d\u043d\u043e \u0432 \u043d\u0435\u0439 \u0438 \u0441\u043e\u0437\u0434\u0430\u044e\u0442\u0441\u044f \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0432\u0441\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u044b. \u0425\u043e\u0440\u043e\u0448\u0435\u0439 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u043e\u0439 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u0438 \u0441\u0445\u0435\u043c\u044b, \u0430 \u043d\u0430 public \u043e\u0442\u043e\u0431\u0440\u0430\u0442\u044c \u043f\u0440\u0430\u0432\u0430 \u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439.<\/p>\n\n\n\n<p>\u0412 PostgreSQL \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0440\u044f\u0434 <strong>DDL (Data Definition Language)<\/strong> \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445, \u0432 \u0446\u0435\u043b\u043e\u043c \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u044e\u0449\u0438\u0439 \u0441\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043e\u043c ANSI \u0438 ISO. \u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b DDL \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>CREATE<\/strong>: \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 CREATE \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043d\u043e\u0432\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0432 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a \u0442\u0430\u0431\u043b\u0438\u0446\u044b, \u0438\u043d\u0434\u0435\u043a\u0441\u044b, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f, \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u0442\u0440\u0438\u0433\u0433\u0435\u0440\u044b \u0438 \u0434\u0440\u0443\u0433\u0438\u0435. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/www.postgresql.org\/docs\/current\/sql-createtable.html\">CREATE TABLE<\/a>: \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043d\u043e\u0432\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b.<\/li>\n\n\n\n<li>CREATE INDEX: \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0438\u043d\u0434\u0435\u043a\u0441\u0430 \u0434\u043b\u044f \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u043f\u043e \u0441\u0442\u043e\u043b\u0431\u0446\u0443 \u0438\u043b\u0438 \u043d\u0430\u0431\u043e\u0440\u0443 \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432.<\/li>\n\n\n\n<li>CREATE VIEW: \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0443\u0434\u043e\u0431\u043d\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0434\u0430\u043d\u043d\u044b\u043c.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>ALTER<\/strong>: \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 ALTER \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0438\u043b\u0438 \u0441\u0432\u043e\u0439\u0441\u0442\u0432 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0432 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:\n<ul class=\"wp-block-list\">\n<li>ALTER TABLE: \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0442\u0430\u0431\u043b\u0438\u0446\u044b, \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0438\u043b\u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432, \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0442\u0438\u043f\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438.<\/li>\n\n\n\n<li><a href=\"https:\/\/www.postgresql.org\/docs\/current\/sql-alterindex.html\">ALTER INDEX<\/a>: \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0438\u043d\u0434\u0435\u043a\u0441\u0430, \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0438\u043b\u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432 \u0438\u0437 \u0438\u043d\u0434\u0435\u043a\u0441\u0430.<\/li>\n\n\n\n<li>ALTER VIEW: \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>DROP<\/strong>: \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 DROP \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0438\u0437 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:\n<ul class=\"wp-block-list\">\n<li>DROP TABLE: \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0438 \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u0441 \u043d\u0435\u0439 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432.<\/li>\n\n\n\n<li>DROP INDEX: \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0438\u043d\u0434\u0435\u043a\u0441\u0430.<\/li>\n\n\n\n<li><a href=\"https:\/\/www.postgresql.org\/docs\/current\/sql-dropview.html\">DROP VIEW<\/a>: \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f.<\/li>\n\n\n\n<li>DROP FUNCTION: \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong><a href=\"https:\/\/www.postgresql.org\/docs\/current\/sql-truncate.html\">TRUNCATE<\/a><\/strong>: \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 TRUNCATE \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u0432\u0441\u0435\u0445 \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u0438\u0437 \u0442\u0430\u0431\u043b\u0438\u0446\u044b, \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0442\u0430\u0431\u043b\u0438\u0446\u044b. \u042d\u0442\u043e \u0431\u043e\u043b\u0435\u0435 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445, \u0447\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 DELETE FROM TABLE, \u0442\u0430\u043a \u043a\u0430\u043a TRUNCATE \u043d\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u0436\u0443\u0440\u043d\u0430\u043b \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0439.<\/li>\n<\/ol>\n\n\n\n<p>\u041f\u0440\u0438\u0432\u0435\u0434\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445, \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a \u043d\u0435\u0439 \u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0435\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b:<\/p>\n\n\n\n<p>\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0441\u0432\u043e\u044e \u0411\u0414 \u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043c\u0441\u044f \u043a \u043d\u0435\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043a\u043e\u043d\u0441\u043e\u043b\u044c\u043d\u0443\u044e \u0443\u0442\u0438\u043b\u0438\u0442\u0443 <strong>psql<\/strong>:<\/p>\n\n\n\n<p><strong>CREATE DATABASE aeugene;<\/strong><\/p>\n\n\n\n<p><strong>\\c aeugene;<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"765\" height=\"118\" src=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2023\/07\/bez-imeni-15-1.png\" alt=\"\" class=\"wp-image-187\" srcset=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2023\/07\/bez-imeni-15-1.png 765w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2023\/07\/bez-imeni-15-1-300x46.png 300w\" sizes=\"auto, (max-width: 765px) 100vw, 765px\" \/><\/figure>\n\n\n\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u043f\u0430\u0440\u0443 \u0437\u0430\u043f\u0438\u0441\u0435\u0439:<\/p>\n\n\n\n<p><strong>CREATE TABLE test (i serial, t text);<\/strong><\/p>\n\n\n\n<p><strong>INSERT INTO test(t) VALUES (&#8216;\u0410\u0440\u0438\u0441\u0442\u043e\u0432&#8217;),(&#8216;\u0415\u0432\u0433\u0435\u043d\u0438\u0439&#8217;);<\/strong><\/p>\n\n\n\n<p><strong>SELECT * FROM test;<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"877\" height=\"242\" src=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2023\/07\/bez-imeni-16-1.png\" alt=\"\" class=\"wp-image-188\" srcset=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2023\/07\/bez-imeni-16-1.png 877w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2023\/07\/bez-imeni-16-1-300x83.png 300w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2023\/07\/bez-imeni-16-1-768x212.png 768w\" sizes=\"auto, (max-width: 877px) 100vw, 877px\" \/><\/figure>\n\n\n\n<p>\u0412\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0441\u0447\u0435\u0442\u0447\u0438\u043a \u0441\u0442\u0440\u043e\u043a (\u0438\u043c\u044f \u043f\u043e\u043b\u044f i, \u0442\u0438\u043f \u2014 \u0441\u0447\u0435\u0442\u0447\u0438\u043a \u0441 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u0435\u043c) \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0430 \u043e\u0442\u043b\u0438\u0447\u043d\u043e \u0438 \u043e\u0431\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u0443 \u043d\u0430\u0441 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0441\u044c \u0432\u043d\u0443\u0442\u0440\u0438 \u0442\u0430\u0431\u043b\u0438\u0446\u044b test \u0432 \u0441\u0445\u0435\u043c\u0435 public (\u0430 \u0438\u043c\u0435\u043d\u043d\u043e \u0432 \u043d\u0435\u0439 \u043c\u044b \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u043c) \u0432 \u0411\u0414 aeugene.<\/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 \u043e\u0434\u0438\u043d\u0430\u0440\u043d\u044b\u0435 \u043a\u0430\u0432\u044b\u0447\u043a\u0438 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u043f\u0440\u044f\u043c\u044b\u043c\u0438 &#8216;, \u0430 \u043d\u0435 \u0444\u0438\u0433\u0443\u0440\u043d\u044b\u043c\u0438<strong> \u2019 <\/strong><\/p>\n\n\n\n<p>\u041e\u0431\u0440\u0430\u0442\u0438\u0432 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u0430, \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443 <strong>psql <\/strong>\\d+:<\/p>\n\n\n\n<p><strong>\\d+ test<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"125\" src=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2023\/07\/bez-imeni-17-1024x125.png\" alt=\"\" class=\"wp-image-189\" srcset=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2023\/07\/bez-imeni-17-1024x125.png 1024w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2023\/07\/bez-imeni-17-300x37.png 300w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2023\/07\/bez-imeni-17-768x94.png 768w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2023\/07\/bez-imeni-17.png 1502w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>\u0412\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u043f\u0440\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u043d\u043e\u0432\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438, \u0443 \u043d\u0430\u0441 \u0432 \u043f\u043e\u043b\u0435 i \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u0441\u0432\u043e\u0435\u043d\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0438\u0437 \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u0430 (\u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438\/sequence) \u043f\u043e \u0438\u043c\u0435\u043d\u0438 test_i_seq, \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u043f\u0440\u0438 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0438 \u0442\u0438\u043f\u0430 \u043f\u043e\u043b\u044f serial.<\/p>\n\n\n\n<p>\u041d\u0430 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u043c \u0441\u0430\u0439\u0442\u0435 PostgreSQL \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0442\u0430\u043a\u0438\u043c\u0438 <a href=\"https:\/\/www.postgresql.org\/docs\/current\/sql-createsequence.html\">\u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044f\u043c\u0438<\/a>.<\/p>\n\n\n\n<p>\u041a\u0440\u043e\u043c\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0442\u0430\u0431\u043b\u0438\u0446\u044b, \u0432 psql \u0435\u0441\u0442\u044c \u0442\u0430\u043a\u0436\u0435 \u043c\u043d\u043e\u0433\u043e \u0434\u0440\u0443\u0433\u0438\u0445 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0445 \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0445 \u043a\u043e\u043c\u0430\u043d\u0434, \u0441\u043f\u0438\u0441\u043e\u043a \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \\? \u0421\u0430\u043c\u044b\u0435 \u0447\u0430\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b:<\/p>\n\n\n\n<p>\\l \u2013 \u0441\u043f\u0438\u0441\u043e\u043a \u0431\u0430\u0437 \u0434\u0430\u043d\u043d\u044b\u0445<br>\\du \u2013 \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439<br>\\dp (\u0438\u043b\u0438 \\z) \u2013 \u0441\u043f\u0438\u0441\u043e\u043a \u0442\u0430\u0431\u043b\u0438\u0446, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0439, \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0435\u0439, \u043f\u0440\u0430\u0432<br>\u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u043d\u0438\u043c<br>\\di \u2013 \u0441\u043f\u0438\u0441\u043e\u043a \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432<br>\\dt \u2013 \u0441\u043f\u0438\u0441\u043e\u043a \u0442\u0430\u0431\u043b\u0438\u0446<br>\\dt+ \u2014 \u0441\u043f\u0438\u0441\u043e\u043a \u0432\u0441\u0435\u0445 \u0442\u0430\u0431\u043b\u0438\u0446 \u0441 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u043c<br>\\dt <em>s<\/em> \u2014 \u0441\u043f\u0438\u0441\u043e\u043a \u0432\u0441\u0435\u0445 \u0442\u0430\u0431\u043b\u0438\u0446, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0445 s \u0432 \u0438\u043c\u0435\u043d\u0438<br>\\dS \u2013 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b<br>\\d+ \u2013 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b<br>\\d \u201ctable_name\u201d \u2013 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b<br>\\i \u0437\u0430\u043f\u0443\u0441\u043a \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0438\u0437 \u0432\u043d\u0435\u0448\u043d\u0435\u0433\u043e \u0444\u0430\u0439\u043b\u0430, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \\i \/home\/script01.sql<\/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 \u044d\u0442\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u0437 psql. \u0415\u0441\u043b\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 DBeaver, \u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0438 \u043e\u043a\u043d\u043e \u043e\u0431\u0437\u043e\u0440\u0430 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432, \u0430 \u043f\u043e\u0442\u043e\u043c \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"660\" height=\"345\" src=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2023\/07\/bez-imeni-18.png\" alt=\"\" class=\"wp-image-193\" srcset=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2023\/07\/bez-imeni-18.png 660w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2023\/07\/bez-imeni-18-300x157.png 300w\" sizes=\"auto, (max-width: 660px) 100vw, 660px\" \/><\/figure>\n\n\n\n<p>\u0412 <a href=\"https:\/\/aristov.tech\/blog\/ispolzovanie-dml-data-manipulation-language-v-postgresql\/\">\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435<\/a> \u043c\u044b \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c DML \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043f\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044e \u0434\u0430\u043d\u043d\u044b\u043c \u0432 PostgreSQL.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0412 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043b\u0438 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 PostgreSQL \u0438 \u0432\u0438\u0434\u0435\u043b\u0438, \u0447\u0442\u043e \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u043c \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u043c \u0432\u0435\u0440\u0445\u043d\u0435\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0411\u0430\u0437\u0430 \u0414\u0430\u043d\u043d\u044b\u0445, \u0434\u0430\u043b\u0435\u0435 \u0438\u0434\u0435\u0442 \u0441\u0445\u0435\u043c\u0430 \u0438 \u0432 \u043d\u0435\u0439 \u0443\u0436\u0435 \u0441\u043e\u0437\u0434\u0430\u044e\u0442\u0441\u044f \u0434\u0440\u0443\u0433\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u044b. \u0421\u0445\u0435\u043c\u043e\u0439 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u0445\u0435\u043c\u0430 public. \u0418\u043c\u0435\u043d\u043d\u043e \u0432 \u043d\u0435\u0439 \u0438 \u0441\u043e\u0437\u0434\u0430\u044e\u0442\u0441\u044f \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0432\u0441\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u044b. \u0425\u043e\u0440\u043e\u0448\u0435\u0439 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u043e\u0439 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u0438 \u0441\u0445\u0435\u043c\u044b, \u0430 \u043d\u0430 public \u043e\u0442\u043e\u0431\u0440\u0430\u0442\u044c \u043f\u0440\u0430\u0432\u0430 \u0443 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[132,127,126,29,125,128,16,133,131,129,130],"class_list":["post-186","post","type-post","status-publish","format-standard","hentry","category-ustrojstvo-postgresql","tag-dt","tag-alter","tag-create","tag-create-database","tag-ddl","tag-drop","tag-postgresql","tag-psql","tag-public","tag-truncate","tag-shema"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0411\u0414 (DDL) \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 \u043e\u0431 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430\u0445, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u0434\u043b\u044f \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 PostgreSQL, \u0438 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0438 \u0441 \u0431\u0430\u0437\u043e\u0439 \u0434\u0430\u043d\u043d\u044b\u0445 \u0447\u0435\u0440\u0435\u0437 \u0443\u0442\u0438\u043b\u0438\u0442\u0443 psql.\" \/>\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\/struktura-bd-ddl-v-pg\/\" \/>\n<meta property=\"og:locale\" content=\"ru_RU\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0411\u0414 (DDL) \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 \u043e\u0431 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430\u0445, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u0434\u043b\u044f \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 PostgreSQL, \u0438 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0438 \u0441 \u0431\u0430\u0437\u043e\u0439 \u0434\u0430\u043d\u043d\u044b\u0445 \u0447\u0435\u0440\u0435\u0437 \u0443\u0442\u0438\u043b\u0438\u0442\u0443 psql.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/aristov.tech\/blog\/struktura-bd-ddl-v-pg\/\" \/>\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=\"2023-07-16T08:19:08+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-02-07T12:47:46+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2023\/07\/bez-imeni-15-1.png\" \/>\n<meta name=\"author\" content=\"aeuge\" \/>\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=\"aeuge\" \/>\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=\"4 \u043c\u0438\u043d\u0443\u0442\u044b\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/struktura-bd-ddl-v-pg\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/struktura-bd-ddl-v-pg\\\/\"},\"author\":{\"name\":\"aeuge\",\"@id\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/#\\\/schema\\\/person\\\/191712eae0472c7752fc806134be751d\"},\"headline\":\"\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0411\u0414 (DDL) \u0432 PostgreSQL\",\"datePublished\":\"2023-07-16T08:19:08+00:00\",\"dateModified\":\"2024-02-07T12:47:46+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/struktura-bd-ddl-v-pg\\\/\"},\"wordCount\":543,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/#\\\/schema\\\/person\\\/05f3a04bf720ae4bf25ac99c4248d5e7\"},\"image\":{\"@id\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/struktura-bd-ddl-v-pg\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/07\\\/bez-imeni-15-1.png\",\"keywords\":[\"\\\\dt\",\"alter\",\"create\",\"CREATE DATABASE\",\"DDL\",\"drop\",\"postgresql\",\"psql\",\"public\",\"truncate\",\"\u0441\u0445\u0435\u043c\u0430\"],\"articleSection\":[\"\u0423\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e PostgreSQL\"],\"inLanguage\":\"ru-RU\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/aristov.tech\\\/blog\\\/struktura-bd-ddl-v-pg\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/struktura-bd-ddl-v-pg\\\/\",\"url\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/struktura-bd-ddl-v-pg\\\/\",\"name\":\"\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0411\u0414 (DDL) \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\\\/struktura-bd-ddl-v-pg\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/struktura-bd-ddl-v-pg\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/07\\\/bez-imeni-15-1.png\",\"datePublished\":\"2023-07-16T08:19:08+00:00\",\"dateModified\":\"2024-02-07T12:47:46+00:00\",\"description\":\"\u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043e\u0431 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430\u0445, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u0434\u043b\u044f \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 PostgreSQL, \u0438 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0438 \u0441 \u0431\u0430\u0437\u043e\u0439 \u0434\u0430\u043d\u043d\u044b\u0445 \u0447\u0435\u0440\u0435\u0437 \u0443\u0442\u0438\u043b\u0438\u0442\u0443 psql.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/struktura-bd-ddl-v-pg\\\/#breadcrumb\"},\"inLanguage\":\"ru-RU\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/aristov.tech\\\/blog\\\/struktura-bd-ddl-v-pg\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"ru-RU\",\"@id\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/struktura-bd-ddl-v-pg\\\/#primaryimage\",\"url\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/07\\\/bez-imeni-15-1.png\",\"contentUrl\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/07\\\/bez-imeni-15-1.png\",\"width\":765,\"height\":118},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/struktura-bd-ddl-v-pg\\\/#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\":\"\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0411\u0414 (DDL) \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\\\/191712eae0472c7752fc806134be751d\",\"name\":\"aeuge\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ru-RU\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/1127d97e7f98e09f2114bab9767af750644ad48a7d8a4f87fce1ab59d0a4ed51?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/1127d97e7f98e09f2114bab9767af750644ad48a7d8a4f87fce1ab59d0a4ed51?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/1127d97e7f98e09f2114bab9767af750644ad48a7d8a4f87fce1ab59d0a4ed51?s=96&d=mm&r=g\",\"caption\":\"aeuge\"},\"url\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/author\\\/aeuge\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0411\u0414 (DDL) \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 \u043e\u0431 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430\u0445, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u0434\u043b\u044f \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 PostgreSQL, \u0438 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0438 \u0441 \u0431\u0430\u0437\u043e\u0439 \u0434\u0430\u043d\u043d\u044b\u0445 \u0447\u0435\u0440\u0435\u0437 \u0443\u0442\u0438\u043b\u0438\u0442\u0443 psql.","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\/struktura-bd-ddl-v-pg\/","og_locale":"ru_RU","og_type":"article","og_title":"\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0411\u0414 (DDL) \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 \u043e\u0431 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430\u0445, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u0434\u043b\u044f \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 PostgreSQL, \u0438 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0438 \u0441 \u0431\u0430\u0437\u043e\u0439 \u0434\u0430\u043d\u043d\u044b\u0445 \u0447\u0435\u0440\u0435\u0437 \u0443\u0442\u0438\u043b\u0438\u0442\u0443 psql.","og_url":"https:\/\/aristov.tech\/blog\/struktura-bd-ddl-v-pg\/","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":"2023-07-16T08:19:08+00:00","article_modified_time":"2024-02-07T12:47:46+00:00","og_image":[{"url":"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2023\/07\/bez-imeni-15-1.png","type":"","width":"","height":""}],"author":"aeuge","twitter_card":"summary_large_image","twitter_misc":{"\u041d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u0430\u0432\u0442\u043e\u0440\u043e\u043c":"aeuge","\u041f\u0440\u0438\u043c\u0435\u0440\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f":"4 \u043c\u0438\u043d\u0443\u0442\u044b"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/aristov.tech\/blog\/struktura-bd-ddl-v-pg\/#article","isPartOf":{"@id":"https:\/\/aristov.tech\/blog\/struktura-bd-ddl-v-pg\/"},"author":{"name":"aeuge","@id":"https:\/\/aristov.tech\/blog\/#\/schema\/person\/191712eae0472c7752fc806134be751d"},"headline":"\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0411\u0414 (DDL) \u0432 PostgreSQL","datePublished":"2023-07-16T08:19:08+00:00","dateModified":"2024-02-07T12:47:46+00:00","mainEntityOfPage":{"@id":"https:\/\/aristov.tech\/blog\/struktura-bd-ddl-v-pg\/"},"wordCount":543,"commentCount":0,"publisher":{"@id":"https:\/\/aristov.tech\/blog\/#\/schema\/person\/05f3a04bf720ae4bf25ac99c4248d5e7"},"image":{"@id":"https:\/\/aristov.tech\/blog\/struktura-bd-ddl-v-pg\/#primaryimage"},"thumbnailUrl":"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2023\/07\/bez-imeni-15-1.png","keywords":["\\dt","alter","create","CREATE DATABASE","DDL","drop","postgresql","psql","public","truncate","\u0441\u0445\u0435\u043c\u0430"],"articleSection":["\u0423\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e PostgreSQL"],"inLanguage":"ru-RU","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/aristov.tech\/blog\/struktura-bd-ddl-v-pg\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/aristov.tech\/blog\/struktura-bd-ddl-v-pg\/","url":"https:\/\/aristov.tech\/blog\/struktura-bd-ddl-v-pg\/","name":"\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0411\u0414 (DDL) \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\/struktura-bd-ddl-v-pg\/#primaryimage"},"image":{"@id":"https:\/\/aristov.tech\/blog\/struktura-bd-ddl-v-pg\/#primaryimage"},"thumbnailUrl":"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2023\/07\/bez-imeni-15-1.png","datePublished":"2023-07-16T08:19:08+00:00","dateModified":"2024-02-07T12:47:46+00:00","description":"\u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043e\u0431 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430\u0445, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u0434\u043b\u044f \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 PostgreSQL, \u0438 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0438 \u0441 \u0431\u0430\u0437\u043e\u0439 \u0434\u0430\u043d\u043d\u044b\u0445 \u0447\u0435\u0440\u0435\u0437 \u0443\u0442\u0438\u043b\u0438\u0442\u0443 psql.","breadcrumb":{"@id":"https:\/\/aristov.tech\/blog\/struktura-bd-ddl-v-pg\/#breadcrumb"},"inLanguage":"ru-RU","potentialAction":[{"@type":"ReadAction","target":["https:\/\/aristov.tech\/blog\/struktura-bd-ddl-v-pg\/"]}]},{"@type":"ImageObject","inLanguage":"ru-RU","@id":"https:\/\/aristov.tech\/blog\/struktura-bd-ddl-v-pg\/#primaryimage","url":"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2023\/07\/bez-imeni-15-1.png","contentUrl":"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2023\/07\/bez-imeni-15-1.png","width":765,"height":118},{"@type":"BreadcrumbList","@id":"https:\/\/aristov.tech\/blog\/struktura-bd-ddl-v-pg\/#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":"\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0411\u0414 (DDL) \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\/191712eae0472c7752fc806134be751d","name":"aeuge","image":{"@type":"ImageObject","inLanguage":"ru-RU","@id":"https:\/\/secure.gravatar.com\/avatar\/1127d97e7f98e09f2114bab9767af750644ad48a7d8a4f87fce1ab59d0a4ed51?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/1127d97e7f98e09f2114bab9767af750644ad48a7d8a4f87fce1ab59d0a4ed51?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/1127d97e7f98e09f2114bab9767af750644ad48a7d8a4f87fce1ab59d0a4ed51?s=96&d=mm&r=g","caption":"aeuge"},"url":"https:\/\/aristov.tech\/blog\/author\/aeuge\/"}]}},"_links":{"self":[{"href":"https:\/\/aristov.tech\/blog\/wp-json\/wp\/v2\/posts\/186","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\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/aristov.tech\/blog\/wp-json\/wp\/v2\/comments?post=186"}],"version-history":[{"count":3,"href":"https:\/\/aristov.tech\/blog\/wp-json\/wp\/v2\/posts\/186\/revisions"}],"predecessor-version":[{"id":445,"href":"https:\/\/aristov.tech\/blog\/wp-json\/wp\/v2\/posts\/186\/revisions\/445"}],"wp:attachment":[{"href":"https:\/\/aristov.tech\/blog\/wp-json\/wp\/v2\/media?parent=186"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/aristov.tech\/blog\/wp-json\/wp\/v2\/categories?post=186"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/aristov.tech\/blog\/wp-json\/wp\/v2\/tags?post=186"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}