1. 18 4月, 2014 1 次提交
  2. 11 4月, 2014 2 次提交
  3. 10 4月, 2014 1 次提交
  4. 04 4月, 2014 1 次提交
    • Y
      PostgreSQL and SQLite, remove varchar limit. [Vladimir Sazhin & Toms Mikoss & Yves Senn] · f4226c3a
      Yves Senn 提交于
      There is no reason for the PG adapter to have a default limit of 255 on :string
      columns. See this snippet from the PG docs:
      
          Tip: There is no performance difference among these three types, apart
          from increased storage space when using the blank-padded type, and a
          few extra CPU cycles to check the length when storing into a
          length-constrained column. While character(n) has performance
          advantages in some other database systems, there is no such advantage
          in PostgreSQL; in fact character(n) is usually the slowest of the
          three because of its additional storage costs. In most situations text
          or character varying should be used instead.
      f4226c3a
  5. 02 4月, 2014 5 次提交
  6. 31 3月, 2014 1 次提交
  7. 18 3月, 2014 2 次提交
    • M
      Reap connections based on owning-thread death · 9e457a86
      Matthew Draper 提交于
      .. not a general timeout.
      
      Now, if a thread checks out a connection then dies, we can immediately
      recover that connection and re-use it.
      
      This should alleviate the pool exhaustion discussed in #12867. More
      importantly, it entirely avoids the potential issues of the reaper
      attempting to check whether connections are still active: as long as the
      owning thread is alive, the connection is its business alone.
      
      As a no-op reap is now trivial (only entails checking a thread status
      per connection), we can also perform one in-line any time we decide to
      sleep for a connection.
      9e457a86
    • M
      Teach PostgreSQLAdapter#reset! to actually reset · cc0d54bc
      Matthew Draper 提交于
      It wasn't doing anything beyond clearing the statement cache.
      cc0d54bc
  8. 11 3月, 2014 2 次提交
  9. 04 3月, 2014 1 次提交
  10. 03 3月, 2014 1 次提交
    • V
      Fix warnings due to: · 398b4de0
      Vipul A M 提交于
      - unused variable in PG Adapter.
      - Ambiguous argument warning from range_test for use - to + Infinity range without brackets.
      398b4de0
  11. 23 2月, 2014 1 次提交
    • Y
      dynamically define PostgreSQL OID range types. · 4cb47167
      Yves Senn 提交于
      This gets AR working with custom defined range types. It also
      removes the need for subtype specific branches in `OID::Range`.
      
      This expands the interface of all `OID` types with the `infinity` method.
      It's responsible to provide a value for positive and negative infinity.
      4cb47167
  12. 09 2月, 2014 1 次提交
  13. 31 1月, 2014 1 次提交
    • A
      Fix regression on `.select_*` methods. · b7fcad8f
      Arthur Neves 提交于
      This was a common pattern:
      ```
      query = author.posts.select(:title)
      connection.select_one(query)
      ```
      
      However `.select` returns a ActiveRecord::AssociationRelation, which has
      the bind information, so we can use that to get the right sql query.
      
      Also fix select_rows on postgress and sqlite3 that were not using the binds
      
      [fixes #7538]
      [fixes #12017]
      [related #13731]
      [related #12056]
      b7fcad8f
  14. 18 1月, 2014 2 次提交
  15. 15 1月, 2014 2 次提交
  16. 07 1月, 2014 1 次提交
    • N
      Make change_table use object of current database adapter · eb589fed
      Nishant Modak 提交于
        - Earlier, change_table was creating database-agnostic object.
        - After this change, it will create correct object based on current
          database adapter.
        - This will ensure that create_table and change_table will get same objects.
        - This makes update_table_definition method public and nodoc.
        - Fixes #13577 and #13503
      eb589fed
  17. 24 12月, 2013 1 次提交
  18. 23 12月, 2013 1 次提交
    • S
      Tell how to Create a Database in Error Message · 0ec45cd1
      schneems 提交于
      Currently if you attempt to use a database that does not exist  you get an error:
      
      ```
      PG::ConnectionBad FATAL:  database "db_error" does not exist
      ```
      
      The solution is easy, create and migrate your database however new developers may not know these commands by memory. Instead of requiring the developer to search for a solution, tell them how to fix the problem in the error message:
      
      ```
      ActiveRecord::NoDatabase: FATAL:  database "db_error" does not exist
      Run `$ bin/rake db:create db:migrate` to create your database
      ```
      
      Active Record should not know about `rake db:migrate` so this additional information needs to come from the railtie. Potential alternative implementation suggestions are welcome.
      0ec45cd1
  19. 19 12月, 2013 1 次提交
  20. 14 12月, 2013 1 次提交
  21. 06 12月, 2013 1 次提交
  22. 05 12月, 2013 1 次提交
  23. 12 11月, 2013 1 次提交
  24. 10 11月, 2013 1 次提交
  25. 09 11月, 2013 1 次提交
    • Y
      log bind variables after they were type casted. · 97f0d9a0
      Yves Senn 提交于
      The log output used to be confusing in situation where type casting has
      "unexpected" effects. For example when finding records with a `String`.
      
      BEFORE:
      
      irb(main):002:0> Event.find("im-no-integer")
      D, [2013-11-09T11:10:28.998857 #1706] DEBUG -- :   Event Load (4.5ms)  SELECT "events".* FROM "events" WHERE "events"."id" = $1 LIMIT 1  [["id", "im-no-integer"]]
      
      AFTER:
      
      irb(main):002:0> Event.find("im-no-integer")
      D, [2013-11-09T11:10:28.998857 #1706] DEBUG -- :   Event Load (4.5ms)  SELECT "events".* FROM "events" WHERE "events"."id" = $1 LIMIT 1  [["id", 0]]
      97f0d9a0
  26. 25 10月, 2013 1 次提交
  27. 22 10月, 2013 1 次提交
  28. 14 10月, 2013 2 次提交
  29. 05 10月, 2013 2 次提交