Other Features
There are a number of PostgreSQL-related PHP functions that I have not covered in this chapter.
Newer versions of PHP have added support for asynchronous query processing (see pg_send_query(), pg_connection_busy(), and pg_get_result()). Asynchronous query processing probably won't be of much use when you are constructing dynamic web pages, but clever coders can use asynchronous queries to provide intermediate feedback for long-running operations (sorry, I'm not that clever).
PHP offers a set of functions that can give you information about a database connection. We used the pg_dbname() function in the first client (see Listing 15.4) to display the name of the database to which we were connected. You can also use the pg_port()
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access