boxen/puppet-postgresql — pull request #6 by goshakkk (2013-02-21 15:56:34+00:00)
Title: Ensure db with *exact* name supplied exists

Currently, if I have a DB named `activerecord_unittest2`, and want `activerecord_unittest` to be created as well...

```puppet
postgresql::db { 'activerecord_unittest': }
postgresql::db { 'activerecord_unittest2': }
```

It will likely create `activerecord_unittest2`, then attempt to check if `activerecord_unittest` exists by just greping `activerecord_unittest`. This string is actually a substring of `activerecord_unittest2` so it will make the function NOT create `activerecord_unittest`, even if it doesn't exist.

This PR fixed that by checking if the DB name being checked is wrapped by spaces from both sides.