As a newly minted Packt author, it makes sense that I might get a request to review one of their books from time to time. On this particular occasion, I have the opportunity to give a look at Instant PostgreSQL Starter by fellow PostgreSQL user and author Daniel K. Lyons.
I’ll be straight-forward with a giant caveat that I’m not the target audience for this booklet. I tried to read with the perspective of a new user since we’ve all been there once, but please bear with me if I break character.
Many new users will find that the examples given using pgAdmin are easy to follow and perform as expected. Users who are new to PostgreSQL likely don’t want to fiddle with the command-line for basic functionality, especially if they are coming from another database such as SQL Server, Oracle, or even MySQL. And for even more complex cases such as hstore, XML manipulation, or full-text searching, we get treated with function and view syntax to help abstract away some of the ugly or annoying syntax.
That said, the number of pgAdmin results were somewhat skimpy, especially when more advanced features are introduced. Seeing result output of some of these would have been nice considering the rather cumbersome and advanced syntax. A new user might have trouble fully understanding these, and if reading without following along, would have no basis for comparison. Additionally, Daniel’s adherence to pgAdmin extends only to using it as a connection method. When creating a user, table, or database, he prefers to use pure SQL instead of pgAdmin’s interface to create or modify these objects. Considering this book is for new users, and we have an entire section on basic SQL syntax for interacting with tables, why omit this?
Speaking of interacting with tables, for the newest of new users, Instant PostgreSQL Starter launches into a quick introduction of SQL syntax. Most readers can generally skip this section, but it’s good to know it’s included. Why? One commonly accepted aspect of marketing is to Get ‘em While They’re Young. If new users can read a simple explanation of SQL that speaks at their level while implying PostgreSQL is the natural extension of that concept, they’re more likely to equate the two. When I first started using databases in 1998, MySQL filled this role, so it’s great seeing material that treats PostgreSQL and beginning SQL as synonymous.
In that same vein, Instant PostgreSQL Starter picks a small set of nine features the author found particularly handy, and he spends some time delving into their use. Not only does this make another great form of marketing PostgreSQL, but these features are very practical. We learn about PostgreSQL-specific features such as pgCrypto, the RETURNING clause, hstore, XML, CTEs, full-text search, and everyday minutia like backup and restore, basic database and table sizing, and using EXPLAIN. But why only nine features? PostgreSQL has a whole matrix of functionality to choose from, and rounding up with another useful tidbit would have been appreciated.
All in all, Instant PostgreSQL Starter is a little bit of everything a new user might want to know about what PostgreSQL can do, and how that might be accomplished. Instructions are clear, and largely a cut-and-paste affair, which lets users easily experiment with the syntax. This is especially important for things like full-text search, which still reflects somewhat unintuitive syntax even this late in PostgreSQL’s life-cycle. Having solid examples for all of these important features is a great way of satisfying new users. And since the book culminates with a lot of community resources and documentation links, new users are encouraged to explore the full power of their new database. And that, we can all support.