Moving from mysql to postgresql, are the best features that I was missing?

I used everything with mysql for development, this week I got the opportunity to work with postgresql, why not!

I've always been told that postgresql has a much larger feature set.
I read some wiki, but most of the information is really out of date.

What are the best features I was missing? Like partial indexes, etc.
Also, am I missing something from mysql?

+8
sql mysql postgresql
source share
5 answers
+18
source share

And do not forget DDL, it is also safe for transactions:

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 if you lose the connection to the database or the server goes down.

+7
source share

In addition to Michael's list (of which I like the window most)

  • check restrictions
  • table functions (functions that can be used in this select * from my_func(42)
  • partial index ( CREATE INDEX idx1 ON some_table (some_column) WHERE some_flag = true )
  • division by zero is an error
  • delete from some_table where 42 is considered an error and does not delete the entire table
  • you may have a subquery in UPDATE or DELETE that selects from the same table that you are updating
  • much more intelligent query optimizer
  • pending restrictions (rarely used, but when you need them, they are really useful)
  • foreign keys are evaluated for the entire statement, not line by line
  • full-text search and spatial extensions in transactional tables
  • BESIDES
+7
source share

Here is a link listing the differences in functions between many of the major database products:

Comparing various SQL implementations

+3
source share

FULL EXTERNAL COMPOUNDS. The lack of this data is one of my biggest complaints about MySQL. But Postgresql supports them.

+1
source share

All Articles