Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Commits on Dec 16, 2012
  1. @le0pard
Commits on Dec 8, 2012
  1. @sodabrew

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

    sodabrew committed
    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. @arturopie

    #7914 Remove code for unsupported postgreSQL version.

    arturopie committed
    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. @arturopie

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

    arturopie committed
    According to postgreSQL documentation:
    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. @arturopie

    #7914 get default value when type uses schema name

    arturopie committed with arturopie
    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
    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. @AvnerCohen

    Fixed unclosing tag

    AvnerCohen committed
Commits on Sep 21, 2012
  1. @jonleighton

    Support for specifying transaction isolation level

    jonleighton committed
    If your database supports setting the isolation level for a transaction,
    you can set it like so:
      Post.transaction(isolation: :serializable) do
        # ...
    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:
    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
    ( which means the isolation level
    gets persisted outside the transaction.
Commits on Sep 17, 2012
  1. @rafaelfranca

    Merge pull request #7547 from danmcclain/pg-arrays

    rafaelfranca committed
    Adds migration and type casting support for PostgreSQL Array datatype
Commits on Sep 14, 2012
  1. @jonleighton
  2. @jonleighton

    Store the transaction number in the transaction object

    jonleighton committed
    This avoids us having to manually increment and decrement it.
  3. Moves column dump specific code to a module included in AbstractAdapter

    Dan McClain committed
    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:
    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
Commits on Sep 6, 2012
  1. @senny
  2. @guedes

    ActiveRecord support to PostgreSQL 9.2 JSON type

    guedes committed
    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.
Commits on Sep 5, 2012
  1. @etehtsea

    Modularize postgresql adapter

    etehtsea committed
Commits on Aug 21, 2012
  1. @kennyj
Commits on Aug 2, 2012
  1. @fxn
Commits on Jul 16, 2012
  1. Don't crash exception translation w/ nil result attribute.

    Steve Jorgensen committed
    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. @tenderlove

    Merge pull request #6874 from robbkidd/rename_sequences_too

    tenderlove committed
    Rename default sequence when table is renamed? [AR:postgres]
Commits on Jul 1, 2012
  1. @rafaelfranca
Commits on Jun 28, 2012
  1. @kennyj
Commits on Jun 27, 2012
  1. @robbkidd
Commits on Jun 22, 2012
  1. @tonywok

    Allow precision option for postgresql datetimes

    tonywok committed
    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. @kennyj @carlosantoniodasilva
Commits on Jun 14, 2012
  1. @etehtsea
Commits on May 30, 2012
  1. @rafaelfranca

    Merge pull request #6477 from steveklabnik/close_discovered_pg_connec…

    rafaelfranca committed
    Properly discover a connection is closed in postgresql_adapter
  2. @tenderlove

    Merge pull request #6386 from kennyj/fix_logs_name_consistency

    tenderlove committed
    Fix logs name consistency.
Commits on May 25, 2012
  1. @tenderlove

    Merge pull request #5872 from evtuhovich/prepared_statement_fix

    tenderlove committed
    Remove prepared statement from system query in postgresql adapter
Commits on May 24, 2012
  1. @steveklabnik

    Properly discover a connection is closed in postgresql_adapter

    steveklabnik committed
    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. @rafaelfranca

    Whitespaces :scissors:

    rafaelfranca committed
  2. @rafaelfranca

    PGconn doesn't accepts :checkout_timeout option.

    rafaelfranca committed
    This option was added on cb6f839
    renaming the :wait_timeout option.
    Fix build!/rails/rails/jobs/1413405
Commits on May 19, 2012
  1. @kennyj
Commits on May 18, 2012
  1. @kennyj

    Fix logs name consistency.

    kennyj committed
Commits on May 17, 2012
  1. @tenderlove

    Merge pull request #6238 from pwnall/pgsql_bytea_limit

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