You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This relies on the HSTORE data type in PostgreSQL. It will not work in MySQL, and HSTORE is as of this writing delegated to the ‘contribs’ package of PostgreSQL, not the core package. See your platform directions for installing ‘contribs’.
Also note that implementation of HSTORE in v8.4 and v9+ are very different and probably exhibit very different performance profiles.
You need to add the HSTORE data type to your database from contribs. If your contribs is installed into /usl/share/pgsql/contrib, then as the user ‘postgres’ you might run:
This will give the database ‘database_name’ access to the HSTORE data type that the gem relies on. There is a copy of ‘hstore.sql’ from PostgreSQL8.4 included in the ‘examples’ directory of this gem for convenience.
Next, you need to create the table and one row for the data to be saved to. You will want to create some kind of migration depending what kind of app you are working in that runs the following SQL only once inside the database:
Add tests for it. This is important so we don’t break it in a future version unintentionally.
Commit, do not mess with rakefile, version, or history. (if you want to have your own version, that is fine, but bump version in a commit by itself so we can ignore when we pull)
Send us a pull request. Bonus points for topic branches.
About
A PostgreSQL interface to the Ruby gem 'adapter' using HSTORE data tye to store data like a Ruby hash.