

# Amazon SCT Action Code Index overview
<a name="chap-sql-server-aurora-pg.tools.actioncode"></a>

This topic provides reference information for the automation levels and action codes used by Amazon Schema Conversion Tool (Amazon SCT) when migrating from Microsoft SQL Server 2019 to Amazon Aurora PostgreSQL. You can use this information to understand the degree of automation available for various database objects and features during the migration process.

The following table shows the icons we use to describe the automation levels of Amazon Schema Conversion Tool (Amazon SCT) and Amazon Database Migration Service (Amazon DMS).


| Automation level icon | Description | 
| --- | --- | 
|   ![\[Five star automation level\]](http://docs.amazonaws.cn/en_us/dms/latest/sql-server-to-aurora-postgresql-migration-playbook/images/pb-automation-5.png)   |   **Full automation**. Amazon SCT performs fully automatic conversion, no manual conversion needed.  | 
|   ![\[Four star automation level\]](http://docs.amazonaws.cn/en_us/dms/latest/sql-server-to-aurora-postgresql-migration-playbook/images/pb-automation-4.png)   |   **High automation**. Minor, simple manual conversions may be needed.  | 
|   ![\[Three star automation level\]](http://docs.amazonaws.cn/en_us/dms/latest/sql-server-to-aurora-postgresql-migration-playbook/images/pb-automation-3.png)   |   **Medium automation**. Low-medium complexity manual conversions may be needed.  | 
|   ![\[Two star automation level\]](http://docs.amazonaws.cn/en_us/dms/latest/sql-server-to-aurora-postgresql-migration-playbook/images/pb-automation-2.png)   |   **Low automation**. Medium-high complexity manual conversions may be needed.  | 
|   ![\[One star automation level\]](http://docs.amazonaws.cn/en_us/dms/latest/sql-server-to-aurora-postgresql-migration-playbook/images/pb-automation-1.png)   |   **Very low automation**. High risk or complex manual conversions may be needed.  | 
|   ![\[No automation\]](http://docs.amazonaws.cn/en_us/dms/latest/sql-server-to-aurora-postgresql-migration-playbook/images/pb-automation-0.png)   |   **No automation**. Not currently supported by Amazon SCT, manual conversion is required for this feature.  | 

The following sections list the Amazon Schema Conversion Tool Action codes for topics that are covered in this playbook.

**Note**  
The links in the table point to the Microsoft SQL Server topic pages, which are immediately followed by the PostgreSQL pages for the same topics.

## Creating Tables
<a name="chap-sql-server-aurora-pg.tools.actioncode.tables"></a>

![\[Four star automation level\]](http://docs.amazonaws.cn/en_us/dms/latest/sql-server-to-aurora-postgresql-migration-playbook/images/pb-automation-4.png)


 Amazon SCT automatically converts the most commonly used constructs of the `CREATE TABLE` statement as both SQL Server and Amazon Aurora PostgreSQL-Compatible Edition (Aurora PostgreSQL) support the entry level American National Standards Institute (ANSI) compliance. These items include table names, containing security schema or database, column names, basic column data types, column and table constraints, column default values, primary, `UNIQUE`, and foreign keys. Some changes may be required for computed columns and global temporary tables.

For more information, see [Creating Tables](chap-sql-server-aurora-pg.sql.tables.md).


| Action code | Action message | 
| --- | --- | 
|  7659  |  If you use recursion, make sure that table variables in your source database and temporary tables in your target database have the same scope.  | 
|  7665  |  PostgreSQL doesn’t support `FILESTREAM` clauses. Amazon SCT skips `FILESTREAM` clauses in the converted code.  | 
|  7678  |   Amazon SCT replaced computed columns with regular columns in the converted code.  | 
|  7679  |   Amazon SCT replaced computed columns with triggers in the converted code.  | 
|  7680  |  PostgreSQL doesn’t support global temporary tables.  | 
|  7812  |  Make sure that you remove the temporary table before the end of the function.  | 
|  7835  |  PostgreSQL doesn’t support `CREATE TABLE` statements with the `AS FileTable` option.  | 

## Data Types
<a name="chap-sql-server-aurora-pg.tools.actioncode.types"></a>

![\[Four star automation level\]](http://docs.amazonaws.cn/en_us/dms/latest/sql-server-to-aurora-postgresql-migration-playbook/images/pb-automation-4.png)


Data type syntax and rules are very similar between SQL Server and Aurora PostgreSQL and most are converted automatically by Amazon SCT. Note that date and time handling paradigms are different for SQL Server and Aurora PostgreSQL and require manual verification or conversion. Also note that due to differences in data type behavior between SQL Server and Aurora PostgreSQL, manual verification and strict testing are highly recommended.

For more information, see [Data Types](chap-sql-server-aurora-pg.sql.datatypes.md).


| Action code | Action message | 
| --- | --- | 
|  7657  |  PostgreSQL doesn’t support the `hierarchyid` data type.  | 
|  7658  |  PostgreSQL doesn’t support the `sql_variant` data type.  | 
|  7662  |  PostgreSQL doesn’t support the `geography` data type.  | 
|  7664  |  PostgreSQL doesn’t support the `geometry` data type.  | 
|  7690  |  PostgreSQL doesn’t support table types.  | 
|  7706  |   Amazon SCT can’t convert the declaration of a variable of the unsupported %s data type.  | 
|  7707  |   Amazon SCT can’t convert the usage of a variable of the unsupported %s data type.  | 
|  7708  |   Amazon SCT can’t convert the usage of the unsupported %s data type.  | 
|  7773  |   Amazon SCT can’t convert arithmetic operations with dates.  | 
|  7775  |  Converted code might lose accuracy compared to the source code.  | 

## Collations
<a name="chap-sql-server-aurora-pg.tools.actioncode.collations"></a>

![\[No automation\]](http://docs.amazonaws.cn/en_us/dms/latest/sql-server-to-aurora-postgresql-migration-playbook/images/pb-automation-0.png)


The collation paradigms of SQL Server and Aurora PostgreSQL are significantly different. Amazon SCT can’t migrate collations automatically to PostgreSQL.

For more information, see [SQL Server Collations and PostgreSQL Encoding](chap-sql-server-aurora-pg.tsql.collations.md).


| Action code | Action message | 
| --- | --- | 
|  7646  |   Amazon SCT can’t convert collations.  | 

## PIVOT and UNPIVOT
<a name="chap-sql-server-aurora-pg.tools.actioncode.pivot"></a>

![\[No automation\]](http://docs.amazonaws.cn/en_us/dms/latest/sql-server-to-aurora-postgresql-migration-playbook/images/pb-automation-0.png)


 Aurora PostgreSQL version 10 doesn’t support `PIVOT` and `UNPIVOT` clauses. Amazon SCT can’t automatically convert `PIVOT` and `UNPIVOT` clauses.

For more information, see [PIVOT and UNPIVOT](chap-sql-server-aurora-pg.tsql.pivot.md).


| Action code | Action message | 
| --- | --- | 
|  7905  |  PostgreSQL doesn’t support `PIVOT` clauses for `SELECT` statements.  | 
|  7906  |  PostgreSQL doesn’t support `UNPIVOT` clauses for `SELECT` statements.  | 

## TOP and FETCH
<a name="chap-sql-server-aurora-pg.tools.actioncode.fetch"></a>

![\[Four star automation level\]](http://docs.amazonaws.cn/en_us/dms/latest/sql-server-to-aurora-postgresql-migration-playbook/images/pb-automation-4.png)


 Aurora PostgreSQL supports the non-ANSI compliant but popular with other engines `LIMIT…​ OFFSET` operator for paging results sets. Amazon SCT can’t automatically convert some options such as `WITH TIES`. These options require manual conversion.

For more information, see [SQL Server TOP and FETCH and PostgreSQL LIMIT and OFFSET](chap-sql-server-aurora-pg.tsql.topfetch.md).


| Action code | Action message | 
| --- | --- | 
|  7605  |  PostgreSQL doesn’t support the `WITH TIES` argument in `TOP` clauses.  | 
|  7796  |  PostgreSQL doesn’t support `TOP` clauses in `UPDATE` statements.  | 
|  7798  |  PostgreSQL doesn’t support `TOP` clauses in `DELETE` statements.  | 
|  7799  |  PostgreSQL doesn’t support `TOP` clauses in `INSERT` operators.  | 

## Cursors
<a name="chap-sql-server-aurora-pg.tools.actioncode.cursors"></a>

![\[Three star automation level\]](http://docs.amazonaws.cn/en_us/dms/latest/sql-server-to-aurora-postgresql-migration-playbook/images/pb-automation-3.png)


PostgreSQL has PL/pgSQL cursors that enable you to iterate business logic on rows read from the database. They can encapsulate the query and read the query results a few rows at a time. All access to cursors in PL/pgSQL is performed through cursor variables, which are always of the `refcursor` data type. There are specific options which aren’t supported for automatic conversion by Amazon SCT.

For more information, see [Cursors](chap-sql-server-aurora-pg.tsql.cursors.md).


| Action code | Action message | 
| --- | --- | 
|  7637  |  PostgreSQL doesn’t support global cursors.  | 
|  7639  |  PostgreSQL doesn’t support dynamic cursors.  | 
|  7700  |   Amazon SCT can’t convert the `KEYSET` option because PostgreSQL doesn’t support changing the membership and order of rows for cursors.  | 
|  7701  |   Amazon SCT doesn’t convert the `FAST_FORWARD` option because this is a default option for cursors in PostgreSQL.  | 
|  7702  |   Amazon SCT doesn’t convert the `READ_ONLY` option because this is a default option for cursors in PostgreSQL.  | 
|  7704  |  PostgreSQL doesn’t support the `OPTIMISTIC` option for cursors.  | 
|  7705  |  PostgreSQL doesn’t support the `TYPE_WARNING` option for cursors.  | 
|  7803  |  PostgreSQL doesn’t support the `FOR UPDATE` option.  | 

## Flow Control
<a name="chap-sql-server-aurora-pg.tools.actioncode.flowcontrol"></a>

![\[Three star automation level\]](http://docs.amazonaws.cn/en_us/dms/latest/sql-server-to-aurora-postgresql-migration-playbook/images/pb-automation-3.png)


Although the flow control syntax of SQL Server differs from Aurora PostgreSQL, Amazon SCT can convert most constructs automatically including loops, command blocks, and delays. Aurora PostgreSQL doesn’t support the `GOTO` and `WAITFOR TIME` commands, which require manual conversion.

For more information, see [SQL Server Flow Control and PostgreSQL Control Structures](chap-sql-server-aurora-pg.tsql.flowcontrol.md).


| Action code | Action message | 
| --- | --- | 
|  7628  |  PostgreSQL doesn’t support `GOTO` statements.  | 
|  7691  |  PostgreSQL doesn’t support the `WAITFOR TIME` feature.  | 
|  7801  |  Make sure that your table isn’t locked by an open cursor.  | 
|  7802  |  Make sure that you delete the table that you created within the procedure before the end of the procedure.  | 
|  7810  |  PostgreSQL doesn’t support `SET NOCOUNT OFF` statements.  | 
|  7821  |   Amazon SCT can’t convert the `WAITFOR` operator with a variable.  | 
|  7826  |   Amazon SCT can’t convert the default value of the `DateTime` variable.  | 
|  7827  |   Amazon SCT can’t convert default values.  | 

## Transaction Isolation
<a name="chap-sql-server-aurora-pg.tools.actioncode.transactionisolation"></a>

![\[Three star automation level\]](http://docs.amazonaws.cn/en_us/dms/latest/sql-server-to-aurora-postgresql-migration-playbook/images/pb-automation-3.png)


 Aurora PostgreSQL supports the four transaction isolation levels specified in the SQL:92 standard: `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, and `SERIALIZABLE`, all of which are automatically converted by Amazon SCT. Also, Amazon SCT converts `BEGIN / COMMIT` and `ROLLBACK` commands that use slightly different syntax. Manual conversion is required for named, marked, and delayed durability transactions that aren’t supported by Aurora PostgreSQL.

For more information, see [Transactions](chap-sql-server-aurora-pg.tsql.transactions.md).


| Action code | Action message | 
| --- | --- | 
|  7807  |   Amazon SCT can’t convert the transaction management command. PostgreSQL doesn’t support explicit transaction management commands such as `BEGIN TRAN`, `SAVE TRAN` in functions.  | 

## Stored Procedures
<a name="chap-sql-server-aurora-pg.tools.actioncode.storedprocedures"></a>

![\[Four star automation level\]](http://docs.amazonaws.cn/en_us/dms/latest/sql-server-to-aurora-postgresql-migration-playbook/images/pb-automation-4.png)


 Aurora PostgreSQL stored procedures provide very similar functionality to SQL Server stored procedures. You can automatically convert them with Amazon SCT. Manual conversion is required for procedures that use `RETURN` values and some less common `EXECUTE` options such as the `RECOMPILE` and `RESULTS SETS`.

For more information, see [Stored Procedures](chap-sql-server-aurora-pg.tsql.storedprocedures.md).


| Action code | Action message | 
| --- | --- | 
|  7640  |  PostgreSQL doesn’t support `EXECUTE` statements with the `WITH RECOMPILE` option.  | 
|  7641  |  PostgreSQL doesn’t support `EXECUTE` statements with the `RESULT SETS UNDEFINED` option.  | 
|  7642  |  PostgreSQL doesn’t support `EXECUTE` statements with the `RESULT SETS NONE` option.  | 
|  7643  |  PostgreSQL doesn’t support `EXECUTE` statements with the `RESULT SETS DEFINITION` option.  | 
|  7672  |  PostgreSQL doesn’t support `EXECUTE` statements that run a character string.  | 
|  7695  |  PostgreSQL doesn’t support support the call of a procedure as a variable.  | 
|  7800  |  PostgreSQL doesn’t support result sets in the SQL Server style.  | 
|  7830  |   Amazon SCT can’t convert arithmetic operations with the `CASE` operand.  | 
|  7838  |   Amazon SCT can’t convert `EXECUTE` statements with `LOGIN` or `USER` options.  | 
|  7839  |  Converted code might not work correctly because of parameter names.  | 

## Triggers
<a name="chap-sql-server-aurora-pg.tools.actioncode.triggers"></a>

![\[Three star automation level\]](http://docs.amazonaws.cn/en_us/dms/latest/sql-server-to-aurora-postgresql-migration-playbook/images/pb-automation-3.png)


 Aurora PostgreSQL supports `BEFORE` and `AFTER` triggers for `INSERT`, `UPDATE`, and `DELETE`. However, Aurora PostgreSQL triggers differ substantially from SQL Server’s triggers. You can migrate the most common use cases with minimal code changes.

For more information, see [Triggers](chap-sql-server-aurora-pg.tsql.triggers.md).


| Action code | Action message | 
| --- | --- | 
|  7809  |  PostgreSQL doesn’t support `INSTEAD OF` triggers on tables.  | 
|  7832  |   Amazon SCT can’t convert `INSTEAD OF` triggers on views.  | 
|  7909  |   Amazon SCT can’t convert `UPDATE(column)` or `COLUMNS_UPDATED` statements.  | 

## MERGE
<a name="chap-sql-server-aurora-pg.tools.actioncode.merge"></a>

![\[No automation\]](http://docs.amazonaws.cn/en_us/dms/latest/sql-server-to-aurora-postgresql-migration-playbook/images/pb-automation-0.png)


 Aurora PostgreSQL version 10 doesn’t support `MERGE` statements. Amazon SCT can’t automatically convert these statements. Manual conversion is straightforward in most cases.

For more information, see [MERGE](chap-sql-server-aurora-pg.tsql.merge.md).


| Action code | Action message | 
| --- | --- | 
|  7915  |  Converted code might produce different results compared to the source code. Make sure that the constraint includes the %s column.  | 
|  7916  |   Amazon SCT can’t emulate the `MERGE` statement using the `INSERT ON CONFLICT` statement.  | 

## Query Hints
<a name="chap-sql-server-aurora-pg.tools.actioncode.queryhints"></a>

![\[Three star automation level\]](http://docs.amazonaws.cn/en_us/dms/latest/sql-server-to-aurora-postgresql-migration-playbook/images/pb-automation-3.png)


You can use Amazon SCT to convert basic query hints such as index hints, except for data manipulation language (DML) statements. Note that specific optimizations used for SQL Server may be completely inapplicable to a new query optimizer. Amazon recommends to start migration testing with all hints removed. Then, selectively apply hints as a last resort if other means such as schema, index, and query optimizations have failed. Plan guides aren’t supported by Aurora PostgreSQL.

For more information, see [SQL Server Query Hints and Plan Guides and PostgreSQL DB Query Planning](chap-sql-server-aurora-pg.tuning.queryplanning.md).


| Action code | Action message | 
| --- | --- | 
|  7823  |  PostgreSQL doesn’t support table hints in DML statements.  | 

## Full-Text Search
<a name="chap-sql-server-aurora-pg.tools.actioncode.fulltextsearch"></a>

![\[No automation\]](http://docs.amazonaws.cn/en_us/dms/latest/sql-server-to-aurora-postgresql-migration-playbook/images/pb-automation-0.png)


Migrating full-text indexes from SQL Server to Aurora PostgreSQL requires a full rewrite of the code that deals with both creating, managing, and querying full-text indexes. Amazon SCT can’t automatically convert these statements.

For more information, see [Full-Text Search](chap-sql-server-aurora-pg.tsql.fulltextsearch.md).


| Action code | Action message | 
| --- | --- | 
|  7688  |  PostgreSQL doesn’t support `FREETEXT` predicates.  | 

## Indexes
<a name="chap-sql-server-aurora-pg.tools.actioncode.indexes"></a>

![\[Three star automation level\]](http://docs.amazonaws.cn/en_us/dms/latest/sql-server-to-aurora-postgresql-migration-playbook/images/pb-automation-3.png)


Basic non-clustered indexes, which are the most commonly used type of indexes are automatically migrated by Amazon SCT. In addition, filtered indexes, indexes with included columns, and some SQL Server specific index options can’t be migrated automatically and require manual conversion.

For more information, see [Indexes](chap-sql-server-aurora-pg.indexes.md).


| Action code | Action message | 
| --- | --- | 
|  7675  |  PostgreSQL doesn’t support `ASC` and `DESC` sorting options for constraints.  | 
|  7681  |  PostgreSQL doesn’t support clustered indexes.  | 
|  7682  |  PostgreSQL doesn’t support the `INCLUDE` option in indexes.  | 
|  7781  |  PostgreSQL doesn’t support the `PAD_INDEX` option in indexes.  | 
|  7782  |  PostgreSQL doesn’t support the `SORT_IN_TEMPDB` option in indexes.  | 
|  7783  |  PostgreSQL doesn’t support the `IGNORE_DUP_KEY` option in indexes.  | 
|  7784  |  PostgreSQL doesn’t support the `STATISTICS_NORECOMPUTE` option in indexes.  | 
|  7785  |  PostgreSQL doesn’t support the `STATISTICS_INCREMENTAL` option in indexes.  | 
|  7786  |  PostgreSQL doesn’t support the `DROP_EXISTING` option in indexes.  | 
|  7787  |  PostgreSQL doesn’t support the `ONLINE` option in indexes.  | 
|  7788  |  PostgreSQL doesn’t support the `ALLOW_ROW_LOCKS` option in indexes.  | 
|  7789  |  PostgreSQL doesn’t support the `ALLOW_PAGE_LOCKS` option in indexes.  | 
|  7790  |  PostgreSQL doesn’t support the `MAXDOP` option in indexes.  | 
|  7791  |  PostgreSQL doesn’t support the `DATA_COMPRESSION` option in indexes.  | 

## Partitioning
<a name="chap-sql-server-aurora-pg.tools.actioncode.partitioning"></a>

![\[Three star automation level\]](http://docs.amazonaws.cn/en_us/dms/latest/sql-server-to-aurora-postgresql-migration-playbook/images/pb-automation-3.png)


 Aurora PostgreSQL uses table inheritance, some of the physical aspects of partitioning in SQL Server don’t apply to Aurora PostgreSQL. For example, the concept of file groups and assigning partitions to file groups. Aurora PostgreSQL supports a much richer framework for table partitioning than SQL Server, with many additional options such as hash partitioning, and sub partitioning.

For more information, see [SQL Server Partitioning and PostgreSQL Partitions or Table Inheritance](chap-sql-server-aurora-pg.storage.partitioning.md).


| Action code | Action message | 
| --- | --- | 
|  7910  |  PostgreSQL doesn’t support `NULL` columns for partitioning.  | 
|  7911  |  PostgreSQL doesn’t support foreign keys referencing partitioned tables.  | 
|  7912  |  PostgreSQL doesn’t support foreign key references from partitioned tables to other tables.  | 
|  7913  |  PostgreSQL doesn’t support `LEFT` partitioning.  | 
|  7914  |  Converted code might produce different results compared to the source code.  | 

Starting from version 11, PostgreSQL supports `NULL` columns for partitioning. In this case, you can ignore the action item with the 7910 code and use `NULL` columns for partitioning in your target tables.

## Backup
<a name="chap-sql-server-aurora-pg.tools.actioncode.backup"></a>

![\[No automation\]](http://docs.amazonaws.cn/en_us/dms/latest/sql-server-to-aurora-postgresql-migration-playbook/images/pb-automation-0.png)


Migrating from a self-managed backup policy to a Platform as a Service (PaaS) environment such as Aurora PostgreSQL is a complete paradigm shift. You don’t need to worry about transaction logs, file groups, disks running out of space, and purging old backups. Amazon Relational Database Service (Amazon RDS) provides guaranteed continuous backup with point in time restore up to 35 days. Therefore, Amazon SCT doesn’t automatically convert backups.

For more information, see [Backup and Restore](chap-sql-server-aurora-pg.hadr.backup.md).


| Action code | Action message | 
| --- | --- | 
|  7903  |  PostgreSQL doesn’t support functionality similar to SQL Server Backup.  | 

## SQL Server Mail
<a name="chap-sql-server-aurora-pg.tools.actioncode.mail"></a>

![\[No automation\]](http://docs.amazonaws.cn/en_us/dms/latest/sql-server-to-aurora-postgresql-migration-playbook/images/pb-automation-0.png)


 Aurora PostgreSQL doesn’t provide native support for sending emails from the database.

For more information, see [Database Mail](chap-sql-server-aurora-pg.management.databasemail.md).


| Action code | Action message | 
| --- | --- | 
|  7900  |  PostgreSQL doesn’t support functionality similar to SQL Server Database Mail.  | 

## Graph
<a name="chap-sql-server-aurora-pg.tools.actioncode.graph"></a>

![\[No automation\]](http://docs.amazonaws.cn/en_us/dms/latest/sql-server-to-aurora-postgresql-migration-playbook/images/pb-automation-0.png)


 Amazon SCT doesn’t convert graph database capabilities.

For more information and potential workarounds, see [SQL Server Graph and PostgreSQL Apache AGE Extension](chap-sql-server-aurora-pg.tsql.graph.md).


| Action code | Action message | 
| --- | --- | 
|  7931  |   Amazon SCT can’t convert SQL Graph tables.  | 
|  7932  |   Amazon SCT can’t convert DML constructs of SQL Graph databases.  | 

## SQL Server Agent
<a name="chap-sql-server-aurora-pg.tools.actioncode.agent"></a>

![\[No automation\]](http://docs.amazonaws.cn/en_us/dms/latest/sql-server-to-aurora-postgresql-migration-playbook/images/pb-automation-0.png)


 Aurora PostgreSQL doesn’t provide functionality similar to SQL Server Agent as an external, cross-instance scheduler. However, Aurora PostgreSQL provides a native, in-database scheduler. It is limited to the cluster scope and can’t be used to manage multiple clusters. Therefore, Amazon SCT can’t automatically convert Agent jobs and alerts.

For more information, see [SQL Server Agent and PostgreSQL Scheduled Lambda](chap-sql-server-aurora-pg.management.scheduledlambda.md).


| Action code | Action message | 
| --- | --- | 
|  7902  |  PostgreSQL doesn’t support functionality similar to SQL Server Agent.  | 

## Service Broker
<a name="chap-sql-server-aurora-pg.tools.actioncode.servicebroker"></a>

![\[No automation\]](http://docs.amazonaws.cn/en_us/dms/latest/sql-server-to-aurora-postgresql-migration-playbook/images/pb-automation-0.png)


 Aurora PostgreSQL doesn’t provide a compatible solution to the SQL Server Service Broker. However, you can use DB Links and Amazon Lambda to achieve similar functionality.

For more information, see [SQL Server Service Broker Essentials](chap-sql-server-aurora-pg.tsql.servicebroker.md).


| Action code | Action message | 
| --- | --- | 
|  7901  |  PostgreSQL doesn’t support functionality similar to SQL Server Service Broker.  | 

## XML
<a name="chap-sql-server-aurora-pg.tools.actioncode.xml"></a>

![\[Three star automation level\]](http://docs.amazonaws.cn/en_us/dms/latest/sql-server-to-aurora-postgresql-migration-playbook/images/pb-automation-3.png)


The XML options and features in Aurora PostgreSQL are similar or almost identical to SQL Server `XPATH` and `XQUERY` functions. PostgreSQL doesn’t support `FOR` XML clause, the walkaround for that is using `string_agg` instead. In some cases, it might be more efficient to use JSON instead of XML.

For more information, see [JSON and XML](chap-sql-server-aurora-pg.tsql.json.md).


| Action code | Action message | 
| --- | --- | 
|  7816  |  PostgreSQL doesn’t support methods for the XML data type.  | 
|  7817  |  PostgreSQL doesn’t support the `FOR XML PATH` option in SQL queries.  | 
|  7920  |  PostgreSQL doesn’t support `EXPLICIT` mode with `FOR XML`.  | 
|  7924  |  PostgreSQL doesn’t support XPath queries that return multiple elements.  | 

## Constraints
<a name="chap-sql-server-aurora-pg.tools.actioncode.constraints"></a>

![\[Four star automation level\]](http://docs.amazonaws.cn/en_us/dms/latest/sql-server-to-aurora-postgresql-migration-playbook/images/pb-automation-4.png)


Constraints feature is almost fully automated and compatible between SQL Server and Aurora PostgreSQL. The differences are: missing `SET DEFAULT` and check constraint with sub-query.

For more information, see [SQL Server Constraints and PostgreSQL Table Constraints](chap-sql-server-aurora-pg.sql.constraints.md).


| Action code | Action message | 
| --- | --- | 
|  7606  |  PostgreSQL doesn’t support foreign keys that reference partitioned tables.  | 
|  7675  |  PostgreSQL doesn’t support `ASC` and `DESC` sorting options for constraints.  | 
|  7825  |   Amazon SCT removed the default value of the `DateTime` column.  | 
|  7915  |  Converted code might produce different results compared to the source code. Make sure that the constraint includes the %s column.  | 

## Linked Servers
<a name="chap-sql-server-aurora-pg.tools.actioncode.linkedservers"></a>

![\[Three star automation level\]](http://docs.amazonaws.cn/en_us/dms/latest/sql-server-to-aurora-postgresql-migration-playbook/images/pb-automation-3.png)


 Aurora PostgreSQL supports remote data access from the database. Connectivity between schemas is trivial, but connectivity to other instances require an extension installation.

For more information, see [SQL Server Linked Servers and PostgreSQL DBLink and FDWrapper](chap-sql-server-aurora-pg.management.linkedservers.md).


| Action code | Action message | 
| --- | --- | 
|  7645  |  PostgreSQL doesn’t support running pass-through commands on linked servers.  | 

## Synonyms
<a name="chap-sql-server-aurora-pg.tools.actioncode.synonyms"></a>

![\[Three star automation level\]](http://docs.amazonaws.cn/en_us/dms/latest/sql-server-to-aurora-postgresql-migration-playbook/images/pb-automation-3.png)


 Aurora PostgreSQL supports synonyms. If synonyms refer to tables, views, or functions, you can replace them with views or functions to wrap those. It becomes more challenging when synonyms refer to other objects.

For more information, see [SQL Server Synonyms and PostgreSQL Views, Types, and Functions](chap-sql-server-aurora-pg.tsql.synonyms.md).


| Action code | Action message | 
| --- | --- | 
|  7792  |  PostgreSQL doesn’t support synonyms.  | 