aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/connection_adapters/postgresql/oid/type_map_initializer.rb
Commit message (Collapse)AuthorAgeFilesLines
* Correct query for PostgreSQL 8.2Matthew Draper2015-09-081-1/+1
| | | | Generic cast-to-text was only added in 8.3.
* Reduce memory usage when loading types in PGSean Griffin2015-03-291-4/+16
| | | | | | | | | | | | | We were never clearing the `PG::Result` object used to query the types when the connection is first established. This would lead to a potentially large amount of memory being retained for the life of the connection. Investigating this issue also revealed several low hanging fruit on the performance of these methods, and the number of allocations has been reduced by ~90%. Fixes #19578
* PostgreSQL, Fix OID based type casts in C for primitive types.Lars Kanis2015-03-251-1/+1
| | | | | | | | | | The type map was introduced in aafee23, but wasn't properly filled. This mainly adjusts many locations, that expected strings instead of integers or boolean. add_pg_decoders is moved after setup of the StatementPool, because execute_and_clear could potentially make use of it.
* Remove an unused option that I didn't mean to commit [ci skip]Sean Griffin2015-02-111-2/+1
|
* Remove most PG specific type subclassesSean Griffin2015-02-111-1/+2
| | | | | | | | | The latest version of the PG gem can actually convert the primitives for us in C code, which gives a pretty substantial speed up. A few cases were only there to add the `infinity` method, which I just put on the range type (which is the only place it was used). Floats also needed to parse `Infinity` and `NaN`, but it felt reasonable enough to put that on the generic form.
* Correctly respect subtypes for PG arrays and rangesSean Griffin2014-12-051-7/+19
| | | | | | | | | | | | | The type registration was simply looking for the OID, and eagerly fetching/constructing the sub type when it was registered. However, numeric types have additional parameters which are extracted from the actual SQL string of the type during lookup, and can have their behavior change based on the result. We simply need to use the block form of registration, and look up the subtype lazily instead. Fixes #17935
* Fix description of OID in TypeMapInitializerPrathamesh Sonpatki2014-10-251-1/+1
| | | | [ci skip]
* Ensure `OID::Array#type_cast_for_database` matches PG's quoting behaviorSean Griffin2014-06-171-1/+1
| | | | | | Also takes a step towards supporting types which use a character other than ',' for the delimiter (`box` is the only built in type for which this is the case)
* Use the generic type map for all PG type registrationsSean Griffin2014-05-221-6/+13
| | | | | | | We're going to want all of the benefits of the type map object for registrations, including block registration and real aliasing. Moves type name registrations to the adapter, and aliases the OIDs to the named types
* Move PG OID types to their own filesSean Griffin2014-05-211-0/+78
As we promote these classes to first class concepts, these classes are starting to gain enough behavior to warrant being moved into their own files. Many of them will become quite large as we move additional behavior to the type objects.