PHP should I use pg_* functions or PDO?
pdo, php, postgresql
Solution
ext/mysql is deprecated because it's ancient and has a much better successor: ext/mysqli. ext/pgsql is not deprecated and has no successor, it's good as is, you can use it as the native Postgres database interface.
PDO is a unified interface to abstract many different database drivers under the same API. It is also a viable interface to use. The native pgsql interface may or may not offer some specific features specific to Postgres which PDO does not support in its abstracted interface. The pgsql API is "closer to the metal" if you will, which may be an advantage if you need it. However, unless you know of some specific thing you need, you probably won't find much of a difference.
Personally I like PDO. If you're unsure, I'd try writing some simple test scripts and decide for one or the other based on which feels more comfortable and which documentation you understand better. That is, unless you have some other deciding factors, such as the flexibility to more easily switch to other databases with the abstraction PDO offers.
Problem
I'm starting a project using a PostgreSQL database. I know that the mysql_* functions are deprecated and it is best practices to use PDO with MySQL databases, but what about PostgreSQL? Are the pg_* functions deprecated or on their way to being deprecated? Is PDO or pg_* the preferred method of talking to postgres? Is one faster or more secure than the other?