1
edit
Changes
→Compare PostgreSQL and MySQL
#Alter table - Postgres supports ALTER TABLE to some extent. You can ADD COLUMN, RENAME COLUMN and RENAME TABLE. MySQL has all options in ALTER TABLE - you can ADD column, DROP it, RENAME or CHANGE its type on the fly - very good feature for busy servers, when you don't want to lock the entire database to dump it, change definition and reload it back.
#Diagnostic Log - By default, PostgreSQL logs to stderr, meaning that it's highly installation specific where the dianostic information is put; on this author's system, the default ends up in /var/lib/pgsql/pgstartup.log. The default can be set to something more reasonable (such as syslog on unix, eventlog on Windows) by adjusting thelog_destination configuration parameter.
#Automatic key generation - :PostgreSQL doesn't support the standard's IDENTITY attribute. PostgreSQL's best offering for a column with auto-generated values is to declare a column of 'type' SERIAL:
<source lang=SQL>
CREATE TABLE tablename (
)
</source>
:MySQL doesn't support the standard's IDENTITY attribute. As an alternative, an integer column may be assigned the non-standard AUTO_INCREMENT attribute:
<source lang=SQL>
CREATE TABLE tablename (