aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/connection_adapters/postgresql/cast.rb
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch '4-1-0-beta2'Rafael Mendonça França2014-02-181-1/+5
|\ | | | | | | | | | | Conflicts: actionview/CHANGELOG.md activerecord/CHANGELOG.md
| * Correctly escape PostgreSQL arrays.Aaron Patterson2014-02-181-1/+5
| | | | | | | | | | | | Thanks Godfrey Chan for reporting this! Fixes: CVE-2014-0080
* | Resolve encoding issues with arrays of hstore (bug 11135).Josh Goodall2014-02-171-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We didn't have enough encoding for the wire protocol to store an array of hstore types. So, further encode any hstore that is an array member. Whilst we're here, ensure it's an HashWithIndifferentAccess being returned, to be consistent with other serialized forms, and add testing for arrays of hstore. So now the following migration: enable_extension "hstore" create_table :servers do |t| t.string :name t.hstore :interfaces, array: true end produces a model that can used like this, to store an array of hashes: server = Server.create(name: "server01", interfaces: [ { name: "bge0", ipv4: "192.0.2.2", state: "up" }, { name: "de0", state: "disabled", by: "misha" }, { name: "fe0", state: "up" }, ]) More at http://inopinatus.org/2013/07/12/using-arrays-of-hstore-with-rails-4/
* | fix quoting non-stringsDamien Mathieu2013-12-221-1/+1
|/ | | | Closes #13444
* Drop unused param `should_be_quoted` to `PostgreSQLColumn#array_to_string`Vipul A M2013-11-171-1/+1
|
* Use infinity constKonstantin Shabanov2013-08-221-2/+2
|
* Rescue invalid ip address exceptions on assign.Paul Nikitochkin2013-08-141-1/+5
| | | | In order that set attribute should not be bang method
* Fix multidimensional PG arrays containing non-string itemsYves Senn2013-08-071-1/+9
|
* Support array as root element in JSONAlexey Noskov2013-05-141-1/+1
|
* Fix #7619. 0x prefix must be added when assigning hexadecimal string into ↵kennyj2013-04-171-2/+4
| | | | bit column in Postgresql, because solving ambiguity.
* Add OID::Bit for supporting bit string.kennyj2013-04-161-0/+7
|
* Make Postgres point type correspond to ruby array with two floats insideMartin Schürrer2013-03-251-0/+11
|
* Fix regex to strip quotations from hstore valuesjlxw2013-03-231-2/+2
| | | | Previously regex did not strip quotation marks where hstore values were multi-line strings.
* Add postgresql range types supportbUg2013-01-231-30/+6
|
* AR supporting new int4range and int8range data type on PostgreSQL >= 9.2. ↵Alexey2012-12-171-4/+11
| | | | Fix realization
* AR supporting new intrange data type on PostgreSQL >= 9.2Alexey2012-12-161-0/+23
|
* Fix postgresql adapter to handle bc timestamps correctlyBogdan Gusiev2012-11-211-0/+2
|
* Moves column dump specific code to a module included in AbstractAdapterDan McClain2012-09-141-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Having column related schema dumper code in the AbstractAdapter. The code remains the same, but by placing it in the AbstractAdapter, we can then overwrite it with Adapter specific methods that will help with Adapter specific data types. The goal of moving this code here is to create a new migration key for PostgreSQL's array type. Since any datatype can be an array, the goal is to have ':array => true' as a migration option, turning the datatype into an array. I've implemented this in postgres_ext, the syntax is shown here: https://github.com/dockyard/postgres_ext#arrays Adds array migration support Adds array_test.rb outlining the test cases for array data type Adds pg_array_parser to Gemfile for testing Adds pg_array_parser to postgresql_adapter (unused in this commit) Adds schema dump support for arrays Adds postgres array type casting support Updates changelog, adds note for inet and cidr support, which I forgot to add before Removing debugger, Adds pg_array_parser to JRuby platform Removes pg_array_parser requirement, creates ArrayParser module used by PostgreSQLAdapter
* ActiveRecord support to PostgreSQL 9.2 JSON typeDickson S. Guedes2012-09-051-0/+16
| | | | | | | | | This implements the support to encode/decode JSON data to/from database and creating columns of type JSON using a native type [1] supported by PostgreSQL from version 9.2. [1] http://www.postgresql.org/docs/9.2/static/datatype-json.html
* Modularize postgresql adapterKonstantin Shabanov2012-09-051-0/+80