help_en: 'convert the conceptual model into a physical model for PostgreSQL'
help_fr: 'convertit le modèle conceptuel en un modèle physique pour PostgreSQL'
help_zh: '将概念模型转换为 PostgreSQL 的物理模型'
fr_examples:
  - order: 1
    example: 'postgresql'
    explanation: 'version de base'
  - order: 4
    example: 'postgresql:b'
    explanation: 'avec _boilerplate_'
parent: 'sql'
stem_suffix: '_ddl_postgresql'
transform_label:
  - order: 1100
    comment: 'Protect reserved keywords'
    search: '(?i)^(ACCESS|ACCESSIBLE|ADD|ALLOCATE|ALTER|ARE|ASENSITIVE|ASSERTION|AT|AUDIT|AUTOINCREMENT|AVG|BACKUP|BEFORE|BEGIN|BETWEEN|BIGINT|BIT|BLOB|BOOLEAN|BREAK|BROWSE|BULK|BY|CALL|CASCADE|CASCADED|CHANGE|CHAR|CHARACTER|CHARACTER_LENGTH|CHECKPOINT|CLOSE|CLUSTER|CLUSTERED|COALESCE|COMMENT|COMMIT|COMPRESS|COMPUTE|CONCAT|CONDITION|CONNECT|CONNECTION|CONSTRAINTS|CONTAINS|CONTAINSTABLE|CONTINUE|CONVERT|CORRESPONDING|COUNT|CUBE|CUME_DIST|CURRENT|CURRENT_PATH|CURSOR|DATABASE|DATABASES|DATE|DAY|DAYS|DAY_HOUR|DAY_MICROSECOND|DAY_MINUTE|DAY_SECOND|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFERRED|DEFINE|DEFINER|DELAYED|DELETE|DENSE_RANK|DENY|DESCRIBE|DETERMINISTIC|DIAGNOSTICS|DISCONNECT|DISTINCTROW|DISTRIBUTED|DIV|DOUBLE|DROP|DUAL|EACH|ELSEIF|EMPTY|ENCLOSED|ENUM|ERRLVL|ESCAPE|ESCAPED|EXCEPTION|EXCLUDE|EXCLUSIVE|EXEC|EXECUTE|EXISTS|EXIT|EXPLAIN|EXTERNAL|EXTRACT|FILE|FILLFACTOR|FILTER|FIRST|FIRST_VALUE|FLOAT|FLOAT4|FLOAT8|FOLLOWING|FORCE|FOUND|FREETEXT|FREETEXTTABLE|FULLTEXT|FUNCTION|GENERATED|GET|GLOB|GLOBAL|GO|GOTO|GROUPING|GROUPS|HASH|HIGH_PRIORITY|HOLDLOCK|HOUR|HOURS|HOUR_MICROSECOND|HOUR_MINUTE|HOUR_SECOND|IDENTIFIED|IDENTITY|IDENTITYCOL|IDENTITY_INSERT|IF|IGNORE|IMMEDIATE|INCREMENT|INDEX|INDEXED|INDICATOR|INFILE|INITIAL|INOUT|INPUT|INSENSITIVE|INSERT|INT|INT1|INT2|INT3|INT4|INT8|INTEGER|INTERVAL|INVOKER|IO_AFTER_GTIDS|IO_BEFORE_GTIDS|ISOLATION|ITERATE|JSON_ARRAYAGG|JSON_EXISTS|JSON_OBJECTAGG|JSON_TABLE|KEY|KEYS|KILL|LAG|LAST|LAST_VALUE|LEAD|LEAVE|LEVEL|LINEAR|LINENO|LINES|LOAD|LOCK|LONG|LONGBLOB|LONGTEXT|LOOP|LOWER|LOW_PRIORITY|LTRIM|MASTER_BIND|MASTER_SSL_VERIFY_SERVER_CERT|MATCH|MAX|MAXEXTENTS|MAXVALUE|MEDIUMBLOB|MEDIUMINT|MEDIUMTEXT|MEMBER|MERGE|MICROSECOND|MICROSECONDS|MIDDLEINT|MIN|MINUS|MINUTE|MINUTES|MINUTE_MICROSECOND|MINUTE_SECOND|MLSLABEL|MOD|MODE|MODIFIES|MODIFY|MONTH|MONTHS|NATIONAL|NCHAR|NEW|NEXT|NO|NOAUDIT|NOCHECK|NOCOMPRESS|NONCLUSTERED|NONE|NOTHING|NOWAIT|NO_WRITE_TO_BINLOG|NTH_VALUE|NTILE|NULLIF|NULLS|NUMBER|NUMERIC|NVARCHAR|OF|OFF|OFFLINE|OFFSETS|ONLINE|OPEN|OPENDATASOURCE|OPENQUERY|OPENROWSET|OPENXML|OPTIMIZE|OPTIMIZER_COSTS|OPTION|OPTIONALLY|OUT|OUTFILE|OUTPUT|OVER|PAD|PARALLEL|PARTIAL|PARTITION|PCTFREE|PERCENT|PERCENTILE_CONT|PERCENTILE_DISC|PERCENT_RANK|PIVOT|PLAN|PORTION|POSITION|PRECEDING|PRECISION|PREPARE|PRESERVE|PRINT|PRIOR|PRIVILEGES|PROC|PROCEDURE|PUBLIC|PURGE|RAISE|RAISERROR|RANGE|RANK|RAW|READ|READS|READTEXT|READ_WRITE|REAL|RECONFIGURE|RECURSIVE|REGEXP|RELATIVE|RELEASE|RENAME|REPEAT|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESOURCE|RESPECT|RESTORE|RESTRICT|RETURN|REVERT|REVOKE|RLIKE|ROLLBACK|ROLLUP|ROW|ROWCOUNT|ROWGUIDCOL|ROWID|ROWNUM|ROWS|ROW_NUMBER|RTRIM|RULE|SAVE|SCHEMA|SCHEMAS|SCROLL|SECOND|SECONDS|SECOND_MICROSECOND|SEMANTICKEYPHRASETABLE|SEMANTICSIMILARITYDETAILSTABLE|SEMANTICSIMILARITYTABLE|SENSITIVE|SEPARATOR|SESSION|SET|SETUSER|SHARE|SHOW|SHUTDOWN|SIGNAL|SIZE|SMALLINT|SOUNDS|SPACE|SPATIAL|SPECIFIC|SQL|SQLCODE|SQLERROR|SQLEXCEPTION|SQLID|SQLSTATE|SQLWARNING|SQL_BIG_RESULT|SQL_BUFFER_RESULT|SQL_CACHE|SQL_CALC_FOUND_ROWS|SQL_NO_CACHE|SQL_SMALL_RESULT|SSL|START|STARTING|STATISTICS|STATS_AUTO_RECALC|STATS_PERSISTENT|STATS_SAMPLE_PAGES|STDDEV_POP|STDDEV_SAMP|STORED|STRAIGHT_JOIN|SUBSTRING|SUCCESSFUL|SUM|SYNONYM|SYSDATE|SYSTEM|TEMPORARY|TERMINATED|TEXTSIZE|TIMEZONE_HOUR|TIMEZONE_MINUTE|TINYBLOB|TINYINT|TINYTEXT|TOP|TRAN|TRANSACTION|TRANSLATE|TRANSLATION|TREAT|TRIGGER|TRIM|TRUNCATE|TRY_CONVERT|TSEQUAL|UESCAPE|UID|UNBOUNDED|UNDO|UNKNOWN|UNLOCK|UNNEST|UNPIVOT|UNSIGNED|UPDATE|UPDATETEXT|UPPER|USAGE|USE|UTC_DATE|UTC_TIME|UTC_TIMESTAMP|VALIDATE|VALUE|VALUES|VARBINARY|VARCHAR|VARCHAR2|VARCHARACTER|VARYING|VAR_POP|VAR_SAMP|VIEW|VIRTUAL|WAITFOR|WHENEVER|WHILE|WITHIN|WITHOUT|WORK|WRITE|WRITETEXT|XML|XMLCAST|XMLEXISTS|XMLFOREST|XMLPARSE|XMLQUERY|XMLROOT|XMLSERIALIZE|XOR|YEAR|YEARS|YEAR_MONTH|ZEROFILL)$'
    replace: '"\1"'
transform_relation_name:
  - order: 1000
    comment: 'Protect reserved keywords'
    search: '(?i)^(ACCESS|ACCESSIBLE|ADD|ALLOCATE|ALTER|ARE|ASENSITIVE|ASSERTION|AT|AUDIT|AUTOINCREMENT|AVG|BACKUP|BEFORE|BEGIN|BETWEEN|BIGINT|BIT|BLOB|BOOLEAN|BREAK|BROWSE|BULK|BY|CALL|CASCADE|CASCADED|CHANGE|CHAR|CHARACTER|CHARACTER_LENGTH|CHECKPOINT|CLOSE|CLUSTER|CLUSTERED|COALESCE|COMMENT|COMMIT|COMPRESS|COMPUTE|CONCAT|CONDITION|CONNECT|CONNECTION|CONSTRAINTS|CONTAINS|CONTAINSTABLE|CONTINUE|CONVERT|CORRESPONDING|COUNT|CUBE|CUME_DIST|CURRENT|CURRENT_PATH|CURSOR|DATABASE|DATABASES|DATE|DAY|DAYS|DAY_HOUR|DAY_MICROSECOND|DAY_MINUTE|DAY_SECOND|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFERRED|DEFINE|DEFINER|DELAYED|DELETE|DENSE_RANK|DENY|DESCRIBE|DETERMINISTIC|DIAGNOSTICS|DISCONNECT|DISTINCTROW|DISTRIBUTED|DIV|DOUBLE|DROP|DUAL|EACH|ELSEIF|EMPTY|ENCLOSED|ENUM|ERRLVL|ESCAPE|ESCAPED|EXCEPTION|EXCLUDE|EXCLUSIVE|EXEC|EXECUTE|EXISTS|EXIT|EXPLAIN|EXTERNAL|EXTRACT|FILE|FILLFACTOR|FILTER|FIRST|FIRST_VALUE|FLOAT|FLOAT4|FLOAT8|FOLLOWING|FORCE|FOUND|FREETEXT|FREETEXTTABLE|FULLTEXT|FUNCTION|GENERATED|GET|GLOB|GLOBAL|GO|GOTO|GROUPING|GROUPS|HASH|HIGH_PRIORITY|HOLDLOCK|HOUR|HOURS|HOUR_MICROSECOND|HOUR_MINUTE|HOUR_SECOND|IDENTIFIED|IDENTITY|IDENTITYCOL|IDENTITY_INSERT|IF|IGNORE|IMMEDIATE|INCREMENT|INDEX|INDEXED|INDICATOR|INFILE|INITIAL|INOUT|INPUT|INSENSITIVE|INSERT|INT|INT1|INT2|INT3|INT4|INT8|INTEGER|INTERVAL|INVOKER|IO_AFTER_GTIDS|IO_BEFORE_GTIDS|ISOLATION|ITERATE|JSON_ARRAYAGG|JSON_EXISTS|JSON_OBJECTAGG|JSON_TABLE|KEY|KEYS|KILL|LAG|LAST|LAST_VALUE|LEAD|LEAVE|LEVEL|LINEAR|LINENO|LINES|LOAD|LOCK|LONG|LONGBLOB|LONGTEXT|LOOP|LOWER|LOW_PRIORITY|LTRIM|MASTER_BIND|MASTER_SSL_VERIFY_SERVER_CERT|MATCH|MAX|MAXEXTENTS|MAXVALUE|MEDIUMBLOB|MEDIUMINT|MEDIUMTEXT|MEMBER|MERGE|MICROSECOND|MICROSECONDS|MIDDLEINT|MIN|MINUS|MINUTE|MINUTES|MINUTE_MICROSECOND|MINUTE_SECOND|MLSLABEL|MOD|MODE|MODIFIES|MODIFY|MONTH|MONTHS|NATIONAL|NCHAR|NEW|NEXT|NO|NOAUDIT|NOCHECK|NOCOMPRESS|NONCLUSTERED|NONE|NOTHING|NOWAIT|NO_WRITE_TO_BINLOG|NTH_VALUE|NTILE|NULLIF|NULLS|NUMBER|NUMERIC|NVARCHAR|OF|OFF|OFFLINE|OFFSETS|ONLINE|OPEN|OPENDATASOURCE|OPENQUERY|OPENROWSET|OPENXML|OPTIMIZE|OPTIMIZER_COSTS|OPTION|OPTIONALLY|OUT|OUTFILE|OUTPUT|OVER|PAD|PARALLEL|PARTIAL|PARTITION|PCTFREE|PERCENT|PERCENTILE_CONT|PERCENTILE_DISC|PERCENT_RANK|PIVOT|PLAN|PORTION|POSITION|PRECEDING|PRECISION|PREPARE|PRESERVE|PRINT|PRIOR|PRIVILEGES|PROC|PROCEDURE|PUBLIC|PURGE|RAISE|RAISERROR|RANGE|RANK|RAW|READ|READS|READTEXT|READ_WRITE|REAL|RECONFIGURE|RECURSIVE|REGEXP|RELATIVE|RELEASE|RENAME|REPEAT|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESOURCE|RESPECT|RESTORE|RESTRICT|RETURN|REVERT|REVOKE|RLIKE|ROLLBACK|ROLLUP|ROW|ROWCOUNT|ROWGUIDCOL|ROWID|ROWNUM|ROWS|ROW_NUMBER|RTRIM|RULE|SAVE|SCHEMA|SCHEMAS|SCROLL|SECOND|SECONDS|SECOND_MICROSECOND|SEMANTICKEYPHRASETABLE|SEMANTICSIMILARITYDETAILSTABLE|SEMANTICSIMILARITYTABLE|SENSITIVE|SEPARATOR|SESSION|SET|SETUSER|SHARE|SHOW|SHUTDOWN|SIGNAL|SIZE|SMALLINT|SOUNDS|SPACE|SPATIAL|SPECIFIC|SQL|SQLCODE|SQLERROR|SQLEXCEPTION|SQLID|SQLSTATE|SQLWARNING|SQL_BIG_RESULT|SQL_BUFFER_RESULT|SQL_CACHE|SQL_CALC_FOUND_ROWS|SQL_NO_CACHE|SQL_SMALL_RESULT|SSL|START|STARTING|STATISTICS|STATS_AUTO_RECALC|STATS_PERSISTENT|STATS_SAMPLE_PAGES|STDDEV_POP|STDDEV_SAMP|STORED|STRAIGHT_JOIN|SUBSTRING|SUCCESSFUL|SUM|SYNONYM|SYSDATE|SYSTEM|TEMPORARY|TERMINATED|TEXTSIZE|TIMEZONE_HOUR|TIMEZONE_MINUTE|TINYBLOB|TINYINT|TINYTEXT|TOP|TRAN|TRANSACTION|TRANSLATE|TRANSLATION|TREAT|TRIGGER|TRIM|TRUNCATE|TRY_CONVERT|TSEQUAL|UESCAPE|UID|UNBOUNDED|UNDO|UNKNOWN|UNLOCK|UNNEST|UNPIVOT|UNSIGNED|UPDATE|UPDATETEXT|UPPER|USAGE|USE|UTC_DATE|UTC_TIME|UTC_TIMESTAMP|VALIDATE|VALUE|VALUES|VARBINARY|VARCHAR|VARCHAR2|VARCHARACTER|VARYING|VAR_POP|VAR_SAMP|VIEW|VIRTUAL|WAITFOR|WHENEVER|WHILE|WITHIN|WITHOUT|WORK|WRITE|WRITETEXT|XML|XMLCAST|XMLEXISTS|XMLFOREST|XMLPARSE|XMLQUERY|XMLROOT|XMLSERIALIZE|XOR|YEAR|YEARS|YEAR_MONTH|ZEROFILL)$'
    replace: '"\1"'
transform_datatype:
  - order: 300
    comment: '(Meant to replace the parent''s transformation)'
    search: 'UNSIGNED_INT_PLACEHOLDER'
    replace: 'SMALLINT'
