aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
Commit message (Collapse)AuthorAgeFilesLines
* Add parameter :sslcompression to PostgreSQL adapter.Lars Kanis2013-05-021-2/+2
| | | | It is new in PostgreSQL-9.2 .
* Improve docs for postgresql with uuid primary keys [ci skip]Carlos Antonio da Silva2013-05-011-8/+7
| | | | Introduced in 09ac1776abc0d3482f491f2d49f47bcb3d9a4ad7.
* allow override of uuid_generate_v4() default by passing default: nilChad Moone2013-05-011-1/+30
| | | | without this, it's not possible to use UUID primary keys without uuid-ossp installed and activated
* Correctly parse bigint defaults in PostgreSQLErik Peterson2013-04-051-1/+1
|
* Merge branch 'master' of github.com:lifo/docrailsVijay Dev2013-03-301-2/+2
|\ | | | | | | | | | | | | | | | | Conflicts: activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb activerecord/test/cases/adapter_test.rb guides/source/testing.md [ci skip]
| * nodoc AR::ConnectionHandling for adapters [ci skip]Francesco Rodriguez2013-03-151-2/+2
| |
* | Adds support for concurrent indexing in PostgreSQL adapterDan McClain2013-03-251-0/+4
| | | | | | | | | | | | | | | | Adds support for algorithm option in MySQL indexes Moves USING and algorithm options upstream The syntax is still specific to the Adapter, so the actual executed string happens in the corresponding adapter
* | Make Postgres point type correspond to ruby array with two floats insideMartin Schürrer2013-03-251-1/+8
| |
* | Created a layer of abstraction for the valid type checking in schema dumper. ↵Ranjay Krishna2013-03-251-0/+4
| | | | | | | | Now, connection handles the check for valid types so that each database can handle the changes individually.
* | add uuid primary key supportAaron Patterson2013-03-221-0/+7
| |
* | pull add_column_options! off the pg connection classAaron Patterson2013-03-221-13/+0
| |
* | push SQL generation inside the schema creation objectAaron Patterson2013-03-221-2/+2
| |
* | mostly decouple TableDefinition from the database connectionAaron Patterson2013-03-221-1/+1
| |
* | decouple column definition from the database connectionAaron Patterson2013-03-221-2/+2
| |
* | use `connect_poll` on pg so that reaping does not hurt the connectionAaron Patterson2013-03-201-2/+1
| |
* | you can provide uuid_generate_v4 as the default value for uuid columnsAaron Patterson2013-03-141-1/+7
| |
* | pg is the only adapter that supports the xml type, so push the method downAaron Patterson2013-03-141-0/+4
| |
* | extract factory method and push common code up to abstract adapterAaron Patterson2013-03-141-5/+2
| |
* | Also quote extension name in disable_extensionStephen Touset2013-03-121-1/+1
| | | | | | A patch was committed recently which quoted the extension name in the SQL for `enable_extension`. But the same wasn't done for `disable_extension`.
* | fixes enable_extension bug in postgresql_adapterDarren Woodley2013-03-081-1/+1
|/ | | | | | | | | The use of quotations is required to install extensions with certain characters in them (e.g. uuid-ossp). removes CHANGELOG entry Deemed unnecessary.
* Unprepared Visitor + unprepared_statementCédric FABIANSKI2013-03-081-1/+1
|
* Wrong exception is occured when raising no translatable exceptionkennyj2013-03-011-0/+2
|
* Support PostgreSQL specific column types when using `change_table`.Yves Senn2013-02-281-2/+14
| | | | | | | | Closes #9480. We use `TableDefinition` for `#create_table` and `Table` for `#change_table`. The PostgreSQL sepcifc types were only defined on `TableDefinition` so I also added them to `Table`.
* Do not type cast all the database url values.Rafael Mendonça França2013-02-241-3/+3
| | | | | | We should only type cast when we need to use. Related to 4b005fb371c2e7af80df7da63be94509b1db038c
* Remove valid_type? methodJon Leighton2013-02-151-4/+0
| | | | | It was supposed to be removed by the preceding two reversions but I did them in the wrong order.
* Revert "Make valid_type? public"Jon Leighton2013-02-151-4/+4
| | | | | | This reverts commit 5d528f835e871f5f9d4b68e8a81cfbe900b7e718. Relates to f8c8ad5 which is also getting reverted due to failing test.
* Make valid_type? publicSam Ruby2013-02-141-4/+4
|
* Merge pull request #9204 from ranjaykrishna/col-probAaron Patterson2013-02-121-0/+4
|\ | | | | schema dumper tests now conducted by ActiveRecord::Base.Connection
| * checking in the abstractions for valid type checking:Ranjay Krishna2013-02-121-0/+4
| |
* | Call super to use the abstract adapter implementation insteadCarlos Antonio da Silva2013-02-061-1/+1
| |
* | add ActiveRecord::AbstractAdapter#extensions and ↵Justin George2013-02-061-0/+9
| | | | | | | | ActiveRecord::ConnectionAdapters::PostgreSQLAdapter#extensions to allow dumping of enabled extensions to schema.rb, add ActiveRecord::SchemaDumper#extensions to dump extensions to schema.rb
* | reloading type map on extension changingAaron Patterson2013-01-291-2/+11
| |
* | fixing commentAaron Patterson2013-01-291-1/+1
| |
* | Fix typoRafael Mendonça França2013-01-291-1/+1
| |
* | Only search for enabled extension if the PostgreSQL version supportsRafael Mendonça França2013-01-291-3/+5
| | | | | | | | extensions
* | add API to pg for enabling / disabling hstoreAaron Patterson2013-01-281-0/+19
| |
* | Fix PostgreSQL tests on TravisAndrew White2013-01-241-0/+5
| | | | | | | | Travis only has PostgreSQL 9.1.x but 9.2 is required for range datatypes.
* | Add postgresql range types supportbUg2013-01-231-11/+34
|/
* Use whitelist to pass valid connection parameters to PGConn.Rafael Mendonça França2013-01-061-7/+10
| | | | | | | | | All the valids parameters for libpq are used. See http://www.postgresql.org/docs/9.1/static/libpq-connect.html for the full list Fixes #8784
* Remove the configuration key in the correct placeRafael Mendonça França2013-01-061-3/+1
|
* Remove unnecessary begin..rescue..end, use only rescueAkira Matsuda2013-01-061-25/+23
|
* Support for PostgreSQL's ltree data type.Rob Worley2013-01-041-1/+8
|
* AR supporting new intrange data type on PostgreSQL >= 9.2Alexey2012-12-161-4/+15
|
* Session variables for mysql, mysql2, and postgresql adapters can be setAaron Stone2012-12-081-1/+16
| | | | | | | | | 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.
* #7914 Remove code for unsupported postgreSQL version.Arturo Pie2012-10-131-3/+0
| | | | | | | 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.
* #7914 Using a better way to get the defaults from db.Arturo Pie2012-10-131-1/+2
| | | | | | | | | 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.
* #7914 get default value when type uses schema nameArturo Pie2012-10-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Fixed unclosing tagAvnerCohen2012-10-091-1/+1
|
* Support for specifying transaction isolation levelJon Leighton2012-09-211-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Merge pull request #7547 from danmcclain/pg-arraysRafael Mendonça França2012-09-161-9/+66
|\ | | | | Adds migration and type casting support for PostgreSQL Array datatype