Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Commits on Dec 16, 2012
  1. Alexey Vasiliev
Commits on Dec 8, 2012
  1. Aaron Stone

    Session variables for mysql, mysql2, and postgresql adapters can be set

    sodabrew authored
    in the new 'variables:' hash in each database config section in database.yml.
    The key-value pairs of this hash will be sent in a 'SET key = value, ...'
    query on new database connections.
    
    The configure_connection methods from mysql and mysql2 into are
    consolidated into the abstract_mysql base class.
Commits on Oct 14, 2012
  1. Arturo Pie

    #7914 Remove code for unsupported postgreSQL version.

    arturopie authored
    Remove parsing of character type default values for 8.1 formatting since
    Rails doesn't support postgreSQL 8.1 anymore.
    
    Remove misleading comment unrelated to code.
  2. Arturo Pie

    #7914 Using a better way to get the defaults from db.

    arturopie authored
    According to postgreSQL documentation:
    (http://www.postgresql.org/docs/8.2/static/catalog-pg-attrdef.html)
    we should not be using 'adsrc' field because this field is unaware of
    outside changes that could affect the way that default values are
    represented. Thus, I changed the queries to use
    "pg_get_expr(adbin, adrelid)" instead of the historical "adsrc" field.
Commits on Oct 13, 2012
  1. Arturo Pie

    #7914 get default value when type uses schema name

    arturopie authored arturopie committed
    PostgreSQL adapter properly parses default values when using multiple
    schemas and domains.
    
    When using domains across schemas, PostgresSQL prefixes the type of the
    default value with the name of the schema where that type (or domain) is.
    
    For example, this query:
    ```
    SELECT a.attname, d.adsrc
    FROM pg_attribute a LEFT JOIN pg_attrdef d
    ON a.attrelid = d.adrelid AND a.attnum = d.adnum
    WHERE a.attrelid = "defaults"'::regclass
    AND a.attnum > 0 AND NOT a.attisdropped
    ORDER BY a.attnum;
    ```
    
    could return something like "'<default_value>'::pg_catalog.text" or
    "(''<default_value>'::pg_catalog.text)::text" for the text columns with
    defaults.
    
    I modified the regexp used to parse this value so that it ignores
    anything between ':: and \b(?:character varying|bpchar|text), and it
    allows to have optional parens like in the above second example.
Commits on Oct 9, 2012
  1. Avner Cohen

    Fixed unclosing tag

    AvnerCohen authored
Commits on Sep 21, 2012
  1. Jon Leighton

    Support for specifying transaction isolation level

    jonleighton authored
    If your database supports setting the isolation level for a transaction,
    you can set it like so:
    
      Post.transaction(isolation: :serializable) do
        # ...
      end
    
    Valid isolation levels are:
    
    * `:read_uncommitted`
    * `:read_committed`
    * `:repeatable_read`
    * `:serializable`
    
    You should consult the documentation for your database to understand the
    semantics of these different levels:
    
    * http://www.postgresql.org/docs/9.1/static/transaction-iso.html
    * https://dev.mysql.com/doc/refman/5.0/en/set-transaction.html
    
    An `ActiveRecord::TransactionIsolationError` will be raised if:
    
    * The adapter does not support setting the isolation level
    * You are joining an existing open transaction
    * You are creating a nested (savepoint) transaction
    
    The mysql, mysql2 and postgresql adapters support setting the
    transaction isolation level. However, support is disabled for mysql
    versions below 5, because they are affected by a bug
    (http://bugs.mysql.com/bug.php?id=39170) which means the isolation level
    gets persisted outside the transaction.
Commits on Sep 17, 2012
  1. Rafael Mendonça França

    Merge pull request #7547 from danmcclain/pg-arrays

    rafaelfranca authored
    Adds migration and type casting support for PostgreSQL Array datatype
Commits on Sep 14, 2012
  1. Jon Leighton
  2. Jon Leighton

    Store the transaction number in the transaction object

    jonleighton authored
    This avoids us having to manually increment and decrement it.
  3. Dan McClain

    Moves column dump specific code to a module included in AbstractAdapter

    danmcclain authored
    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
Commits on Sep 6, 2012
  1. Yves Senn
  2. Dickson S. Guedes

    ActiveRecord support to PostgreSQL 9.2 JSON type

    guedes authored
    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
Commits on Sep 5, 2012
  1. Konstantin Shabanov

    Modularize postgresql adapter

    etehtsea authored
Commits on Aug 21, 2012
  1. Toshinori Kajihara
Commits on Aug 2, 2012
  1. Xavier Noria
Commits on Jul 16, 2012
  1. Don't crash exception translation w/ nil result attribute.

    Steve Jorgensen authored
    Exception.result is nil when attempting a query after PostgreSQL
    disconnect, resulting in new exception:
    NoMethodError: undefined method `error_field' for nil:NilClass
Commits on Jul 10, 2012
  1. Aaron Patterson

    Merge pull request #6874 from robbkidd/rename_sequences_too

    tenderlove authored
    Rename default sequence when table is renamed? [AR:postgres]
Commits on Jul 1, 2012
  1. Rafael Mendonça França
Commits on Jun 28, 2012
  1. Toshinori Kajihara
Commits on Jun 27, 2012
  1. Robb Kidd
Commits on Jun 22, 2012
  1. Tony Schneider

    Allow precision option for postgresql datetimes

    tonywok authored
    This patch addresses the difficulty of retrieving datetime fields. By default, the database holds a higher precision than the time as a String.
    
    This issue is discussed at length at the following links:
    - [#3519](#3519)
    - [#3520](#3520)
    
    Also, kudos to @mattscilipoti
Commits on Jun 18, 2012
  1. Toshinori Kajihara Carlos Antonio da Silva
Commits on Jun 14, 2012
  1. Konstantin Shabanov
Commits on May 30, 2012
  1. Rafael Mendonça França

    Merge pull request #6477 from steveklabnik/close_discovered_pg_connec…

    rafaelfranca authored
    …tion
    
    Properly discover a connection is closed in postgresql_adapter
  2. Aaron Patterson

    Merge pull request #6386 from kennyj/fix_logs_name_consistency

    tenderlove authored
    Fix logs name consistency.
Commits on May 25, 2012
  1. Aaron Patterson

    Merge pull request #5872 from evtuhovich/prepared_statement_fix

    tenderlove authored
    Remove prepared statement from system query in postgresql adapter
Commits on May 24, 2012
  1. Steve Klabnik

    Properly discover a connection is closed in postgresql_adapter

    steveklabnik authored
    PQstatus doesn't properly test if future operations will succeed. A
    PQping function is added to libpq in PostgreSQL 9.1, but if we rely
    on it, everyone on earlier versions of Postgres is out of luck,
    and the pg gem wouldn't have the 'fix' until the next release.
    
    Thanks to @cbrecabarren and @ged for handling all the dirty details.
    
    Closes #3392.
Commits on May 23, 2012
  1. Rafael Mendonça França

    Whitespaces :scissors:

    rafaelfranca authored
  2. Rafael Mendonça França

    PGconn doesn't accepts :checkout_timeout option.

    rafaelfranca authored
    This option was added on cb6f839
    renaming the :wait_timeout option.
    
    Fix build http://travis-ci.org/#!/rails/rails/jobs/1413405
Commits on May 19, 2012
  1. Toshinori Kajihara
Commits on May 18, 2012
  1. Toshinori Kajihara

    Fix logs name consistency.

    kennyj authored
Commits on May 17, 2012
  1. Aaron Patterson

    Merge pull request #6238 from pwnall/pgsql_bytea_limit

    tenderlove authored
    Postgresql doesn't accept limits on binary (bytea) columns.
Commits on May 12, 2012
  1. Ivan Evtuhovich
Something went wrong with that request. Please try again.