I am contemplating a switch from MySQL to PostgreSQL.
What are your tips, tricks and gotchas for working with PostgreSQL?
What should a MySQLer look out for?
See also: How different is PostgreSQL to MySQL?
See also: Migrate from MySQL to PostgreSQL
Note - I don't think this is a duplicate. In particular the type of answers are quite diffferent and the responses here have much more implementation detail, which is what I was looking for
Just went through this myself, well I still am...
INSERT IGNORE
and REPLACE
LOAD DATA INFILE
(COPY
is close, but not close enough)autoincrement
to SERIAL
INNER JOIN
without an ON
clause can't happen, use CROSS JOIN
or the likeCOUNT(*)
can be crazy slowinterval
vs. Postgres interval
(for time intervals)AS
CALL proc();
; rewrite proc()
as a function and SELECT proc();
.