PostgreSQL 9.0.0, released today, contains the MySQL Emulation Layer.
To enable this feature, set the
mysql_compatible option GUC to
Enabling this option changes the following characteristics (in the entire PostgreSQL cluster):
- The boolean data type now accepts positive integers, in addition to
- The default TCP port is
3306in order to make porting applications easier.
- Non-aggregate columns in the SELECT list need no longer appear in the GROUP BY clause.
- CAST may or may not work.
- ENUMs can no longer contain numbers, only characters are allowed
TEXTare case insensitive now. Case sensitive matching is only done with the new
VARCHARsupports texts up to a length of
255bytes. Bear in mind that because Unicode/UTF8 characters may need more than one byte for any given character, you must take this into account when calculating what
VARCHARcan actually store.
- Double dash comments must start with a space after the dashes.
- Division by zero now raises a warning instead of throwing an error.
||operator no longer concats strings but is
- For convenience, you may use dates like
- Replication - including bugs - is integrated.
- The parser now understands
- Porters did not finish the MySQL authentication system in the time allotted. DBAs will need to continue to use
pg_hba.conffor the time being.
The following new features are activated by enabling
mysql_compatible = on:
- The new black hole engine is an alias for
/dev/null, and of course, is not transactional.
- Table names depend on the underlaying filesystem: on Windows the table name is not case sentitive, on most Unix systems
DATAare different tables.
- Several release-critical bugs were introduced, to make debugging the application more fun.
- For convenience, PostgreSQL is providing a root user.
Some well-known PostgreSQL-features are incompatible with this new extension:
- ACID: Instead, MySQL ACID will be used. Committed data may or may not be written after a crash, depending on - among other details - the current phase of the moon, the color of electrons and the weather conditions in Oz.
- Transactional DDL and DCL.
- User defined data types.
- For convenience, EXPLAIN output is printed on a single line.
- Schemas are no longer supported.
Certainly, support is available for all users of the new emulation layer. The license of this extension is BSD-style, allowing users to use and integrate PostgreSQL with MySQL Emulation Layer into your application. Dual-licensing is no longer a source of trouble.