Hacker News new | ask | show | jobs
by jayess 3823 days ago
Can anyone suggest a good "getting started" tutorial for PostgreSQL/debian/php? I've been using Mysql for years and would like to give Postgres a try.
2 comments

http://www.postgresql.org/docs/9.5/static/tutorial-start.htm...

What particularly are you looking for in a "getting started" tutorial? Honestly, you should just plunge in, on some side project (or a mirror of whatever projects you've used MySQL on) and just compare.

This is a lot easier to say than do/live by, but I think you shouldn't invest in one tool choice when you haven't given the others a fair shake (once you have enough time to step back and think about your decision).

Install it, and then build something.

A few things you will want to look at that are different:

1. data types are much richer and more useful than in mysql

2. transactional DDL means migrations are atomic.

3. schemas are what mysql refers to as databases. Remember to set `search_path`.

4. roles and grants are somewhat more expressive and work differently than in mysql, but not that differently for the simpler use cases

5. database functions ( aka stored procedures ) are awesome as are extension languages.

On point 5... love PLv8, which imho makes working with the newer JSON data types really nice.