FAQ
===

**DoesMigrationToolkitsupportthemigrationofpackages?**

Migration Toolkit supports the migration of packages from an Oracle
database into EDB Postgres Advanced Server. See :ref:`Functionality overview <Overview>`  for
information about the migration support offered by EDB Postgres Advanced
Server.

**Isthereawaytotransferonlythedatafromthesourcedatabase?**

Yes. Data transfer is supported as part of an online or offline
migration.

**DoesMigrationToolkitsupportmigrationoftablesthatcontaindataoftheCLOBdatatype?**

Migration Toolkit does support migration of tables containing data of
the CLOB type.

**DoesEDBPostgresAdvancedServersupporttheenumdatatype?**

EDB Postgres Advanced Server doesn’t currently support the enum data
type but will support it in future releases. Until then, you can use a
check constraint to restrict the data added to an EDB Postgres Advanced
Server database. A check constraint defines a list of valid values that
a column can take.

The following code sample includes a simple example of a check
constraint that restricts the value of a column to one of three dept
types; ``sales`` , ``admin`` or ``technical`` .

.. code:: sql

   CREATE TABLE emp (
     emp_id INT NOT NULL PRIMARY KEY,
     dept VARCHAR(255) NOT NULL,

     CHECK (dept IN (sales, admin, technical))
   );

If you test the check constraint by entering a valid dept type, the
INSERT statement works without error:

.. code:: sql

   test=# INSERT INTO emp VALUES (7324, sales);

   INSERT 0 1

If you try to insert a value not included in the constraint (``support``
), EDB Postgres Advanced Server returns an error:

.. code:: sql

   test=# INSERT INTO emp VALUES (7325, support);

   ERROR: new row for relation "emp" violates check constraint "emp_dept_check"

**DoesEDBPostgresAdvancedServersupportmaterializedviews?**

Postgres doesn’t support materialized views compatible with Oracle
databases. To set up a materialized view/summary table in Postgres you
must manually create the triggers that maintain the summary
table. Automatic query rewrite isn’t currently supported. You must make
the application aware of the summary table’s existence.

**WhenItrytomigratefromaMySQLdatabasethatincludesaTIMEdatatype,Igetthefollowingerror:ErrorLoadingDataintoTable:BadformatforTime.DoesPostgressupportMySQL``TIME``datatypes?**

Postgres doesn’t have a problem storing ``TIME`` data types as long as
the value of the hour component isn’t greater than 24.

Unlike Postgres, the MySQL ``TIME`` data type allows you to store a
value that represents either a ``TIME`` or an ``INTERVAL`` value. A
value stored in a MySQL ``TIME`` column that represents an ``INTERVAL``
value can potentially be out of the accepted range of a valid Postgres
``TIMESTAMP`` value. If, during the migration process, Postgres
encounters a value stored in a ``TIME`` data column that it perceives as
out of range, it returns an error.
