I used to develop everything with mysql, this week an opportunity to work with postgresql appeared, why not!
I was always told that postgresql had a much bigger feature set.
I read some wikis, but most of the info are really outdated.
What are the best features I was missing? Like partial indexes, etc..
Also, I will miss something from mysql?
To connect MySQL to PostgreSQL through Foreign Data Wrapper, you must take note of the following as this is what will be required to create the connection: CREATE EXTENSION command to create a MySQL Foreign Data Wrapper extension to the PostgreSQL host. CREATE SERVER command to define a connection to the MySQL Server.
MySQL-to-PostgreSQL is a program to migrate MySQL databases to PostgreSQL server. Option to filter data using SELECT-queries, synchronization mode, command line support. FromMySqlToPostgreSql migration tool by Anatoly Khaytovich, provides an accurate migration of table data, indices, PKs, FKs...
The Critical Differences of Postgres vs MySQL:MySQL is a simpler database that's fast, reliable, well understood, and easy to set up and manage. PostgreSQL is an object-relational database (ORDBMS) with features like table inheritance and function overloading, whereas MySQL is a pure relational database (RDBMS).
One of the nicest feature of
User-defined aggregates:
CTE, supports recursion
generate_series
Windowing functions:
Superb date functions
Array support
Richer data types
Functional dependency on primary keys when grouping on it (on next version, 9.1)
User-defined operator
DISTINCT ON
LATERAL JOIN
Custom data type using DOMAIN
Passing the whole row to function
And don't forget the DDL, it's also transaction safe:
BEGIN;
ALTER TABLE foo DROP COLUMN bar;
ALTER TABLE foo ADD COLUMN baz INET;
COMMIT;
Great for maintenance work, you will always have a consistent database, even when you lose the database connection or the server goes down.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With