This is a mirror of official site: http://jasper-net.blogspot.com/

PostgreSQL 9.0: Includes the new MySQL Emulation Layer

| Tuesday, April 6, 2010
PostgreSQL 9.0.0, released today, contains the MySQL Emulation Layer.

To enable this feature, set the mysql_compatible option GUC to "on".

postgres=# SELECT * FROM pg_settings WHERE name = 'mysql_compatible';
-[ RECORD 1 ]----------------------------------------------------------------
name         | mysql_compatible
setting       | ON
unit            |
category     | Version AND Platform Compatibility / Other Platforms AND Clients
short_desc | Enable MySQL Emulation Layer
extra_desc |
context       | backend
vartype      | bool
source        | DEFAULT
min_val      |
max_val     |

Enabling this option changes the following characteristics (in the entire PostgreSQL cluster):

   * The boolean data type now takes positive integers in addition to "true" and "false".
   * The default TCP port is 3306 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
   * CHAR, VARCHAR and TEXT are case insensitive now. Case sensitive matching is only done with the new BINARY keyword.
   * VARCHAR supports texts up to a length of 255 bytes. Bear in mind that since Unicode/UTF8 characters may need more than one byte for any given character, you must take this into account when calculating what VARCHAR can actually store.
   * Double dash comments must be start with a space after the dashes.
   * Division by zero now raises a warning instead of an error.
   * The || no longer concats strings but is Exclusive OR.
   * For convenience, you may use dates like 2010-02-31.
   * Replication - including bugs - is integrated.
   * The parser now understands DESC and SHOW CREATE syntax.
   * Porters did not finish the MySQL authentication system in the time allotted. DBAs will need to continue to use pg_hba.conf.


Read more: Andreas

Posted via email from jasper22's posterous

0 comments: