aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
Commit message (Collapse)AuthorAgeFilesLines
* Smattering of grammatical fixes to documentation. Closes #10083 [BobSilva]Marcel Molina2007-11-081-8/+8
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8113 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Foxy fixtures. Adapter#disable_referential_integrity. Closes #9981.Jeremy Kemper2007-10-261-0/+8
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8036 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* PostgreSQL: support multiline default values. Closes #7533.Jeremy Kemper2007-10-081-14/+14
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7801 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Allow change_column to set NOT NULL in the PostgreSQL adaptor. Closes #3904 ↵Michael Koziarski2007-10-071-17/+12
| | | | | | [tarmo] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7766 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed spelling errors (closes #9706) [tarmo/rmm5t]David Heinemeier Hansson2007-09-281-2/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7666 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Speed up and simplify query caching.Jeremy Kemper2007-09-171-5/+4
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7498 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* connection.select_rows 'sql' returns an array (rows) of arrays (field ↵Jeremy Kemper2007-09-161-7/+25
| | | | | | values). Closes #2329. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7497 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Improve performance and functionality of the postgresql adapter. Closes ↵Michael Koziarski2007-08-161-176/+415
| | | | | | #8049 [roderickvd] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7329 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Typo in PostgreSQL change_column quoting. References #8466.Jeremy Kemper2007-05-291-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6891 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* SQLite, MySQL, PostgreSQL, Oracle: quote column names in column migration ↵Jeremy Kemper2007-05-291-7/+10
| | | | | | SQL statements. Closes #8466. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6889 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* PostgreSQL: remove DateTime -> Time downcast. Bypass the DateTime migration ↵Jeremy Kemper2007-03-161-10/+0
| | | | | | test on 64-bit platforms since it may be a Time. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6433 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix typo. References #7727, closes #7762.Jeremy Kemper2007-03-081-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6355 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* PostgreSQL: don't use async_exec and async_query with postgres-pr. Closes #7727.Jeremy Kemper2007-03-061-1/+4
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6346 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Use Date#to_s(:db) for quoted dates. Closes #7411.Jeremy Kemper2007-01-281-1/+6
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6061 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* change_column accepts :default => nil. Closes #6956.Jeremy Kemper2007-01-151-3/+6
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5937 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* MySQL, PostgreSQL: change_column_default quotes the default value and ↵Jeremy Kemper2007-01-151-1/+1
| | | | | | doesn't lose column type information. References #3987, closes #6664. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5935 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* PostgreSQL: use a subselect to correctly perform eager finds with :limit and ↵Jeremy Kemper2007-01-121-4/+16
| | | | | | :order. Closes #4668. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5887 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Oracle: fix limited id selection for eager loading. Closes #6515.Jeremy Kemper2006-11-101-10/+19
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5480 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Oracle: resolve test failures, use prefetched primary key for inserts, check ↵Jeremy Kemper2006-11-011-12/+0
| | | | | | for null defaults. Factor out some common methods from all adapters. Closes #6515. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5384 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* automatically add primary key to #select_limited_ids_list order by clause ↵Rick Olson2006-10-131-0/+4
| | | | | | for databases that require order columns in the distinct statements (postgresql) [Rick] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5292 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* fix select_limited_ids_list issues in postgresql, retain current behavior in ↵Rick Olson2006-10-131-1/+10
| | | | | | other adapters [Rick] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5291 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* learn to clean up after myselfRick Olson2006-10-091-4/+0
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5266 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Reverted old select_limited_ids_list postgresql fix that caused issues in ↵Rick Olson2006-10-091-0/+4
| | | | | | mysql. Closes #5851 [Rick] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5265 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Rollback #5819 since it's compatible with PostgreSQL 8.1 only. References #5819.Jeremy Kemper2006-08-221-1/+5
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4806 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* whitespaceJeremy Kemper2006-08-191-2/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4789 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* PostgreSQL: simplify index introspection query. Closes #5819.Jeremy Kemper2006-08-191-5/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4788 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* PostgreSQL: autodetected sequences work correctly with multiple schemas. ↵Jeremy Kemper2006-08-091-2/+3
| | | | | | Rely on the schema search_path instead of explicitly qualifying the sequence name with its schema. Closes #5280. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4737 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* PostgreSQL: return array fields as strings. Closes #4664.Jeremy Kemper2006-07-101-0/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4605 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r4704@asus: jeremy | 2006-06-27 12:00:19 -0700Jeremy Kemper2006-07-081-8/+12
| | | | | | | | | | | | | | | decimal r4705@asus: jeremy | 2006-06-27 12:20:47 -0700 current_adapter? checks whether any of its arguments is the name of the current adapter class r4834@asus: jeremy | 2006-07-08 13:08:24 -0700 Room to float. r4835@asus: jeremy | 2006-07-08 13:09:18 -0700 Give lock test a few chances. r4836@asus: jeremy | 2006-07-08 13:12:05 -0700 Numeric and decimal columns map to BigDecimal instead of Float. Those with scale 0 map to Integer. Closes #5454. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4596 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* PostgreSQL: correctly quote the ' in pk_and_sequence_for. Closes #5462.Jeremy Kemper2006-07-071-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4580 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* PostgreSQL: correctly quote microseconds in timestamps. Closes #5641.Jeremy Kemper2006-07-071-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4579 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* PostgreSQL: add_column can add a not null column with a default.Jeremy Kemper2006-07-071-3/+17
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4575 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* PostgreSQL: support microsecond time resolution. Closes #5492.Jeremy Kemper2006-06-251-1/+5
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4494 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r4644@asus: jeremy | 2006-06-16 14:57:03 -0700Jeremy Kemper2006-06-191-19/+34
| | | | | | | | | | | | | | | | | | | | | locking r4645@asus: jeremy | 2006-06-17 12:41:30 -0700 missing reply fixture r4646@asus: jeremy | 2006-06-19 13:05:23 -0700 Use a per-thread (rather than global) transaction mutex so you may execute concurrent transactions on separate connections. r4647@asus: jeremy | 2006-06-19 13:07:23 -0700 PostgreSQL: introduce allow_concurrency option which determines whether to use blocking or asynchronous #execute. Adapters with blocking #execute will deadlock Ruby threads. The default value is ActiveRecord::Base.allow_concurrency. r4648@asus: jeremy | 2006-06-19 13:08:40 -0700 Pass the default allow_concurrency when instantiating new connections. r4649@asus: jeremy | 2006-06-19 13:11:12 -0700 Break out concurrent transaction tests and run them for PostgreSQLAdapter only (need to fork or system('some_test_script') for the other adapters) r4650@asus: jeremy | 2006-06-19 13:42:48 -0700 Row locking. Provide a locking clause with the :lock finder option or true for the default "FOR UPDATE". r4661@asus: jeremy | 2006-06-19 15:36:51 -0700 excise the junk mutex git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4460 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* PostgreSQL: don't ignore port when host is nil since it's often used to ↵Jeremy Kemper2006-06-021-1/+1
| | | | | | label the domain socket. Closes #5247. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4401 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* PostgreSQL: migrations support :limit with :integer columns by mapping limit ↵Jeremy Kemper2006-05-121-0/+12
| | | | | | < 4 to smallint, > 4 to bigint, and anything else to integer. Closes #2900. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4335 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Properly quote index names in migrations (closes #4764) [John Long]Rick Olson2006-04-201-2/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4239 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Multiple fixes and optimizations in PostgreSQL adapter, allowing ↵Tobias Lütke2006-04-041-7/+25
| | | | | | ruby-postgres gem to work properly. Closes #4461 git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4156 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add AbstractAdapter#table_alias_for to create table aliases according to the ↵Rick Olson2006-03-181-0/+3
| | | | | | rules of the current adapter. [Rick] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3916 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Remove broken attempts at handling columns with a a default of 'now()' in ↵Michael Koziarski2006-03-181-3/+0
| | | | | | the postgresql adapter. Closes #2257 git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3913 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* ActiveRecord::Base.remove_connection explicitly closes database connections ↵Jeremy Kemper2006-02-261-0/+5
| | | | | | and doesn't corrupt the connection cache. Introducing the disconnect! instance method for the PostgreSQL, MySQL, and SQL Server adapters; implementations for the others are welcome. References #3591. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3674 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* PostgreSQL: correctly parse negative integer column defaults. References #3776.Jeremy Kemper2006-02-091-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3554 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Support the :column option for remove_index with the PostgreSQL adapter. ↵Marcel Molina2006-01-311-7/+1
| | | | | | Closes #3661. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3499 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix change_column to work with postgres 7.x and 8.x.Scott Barron2005-12-201-1/+11
| | | | | | | Closes #3141 git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3327 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* DRY up PG's add_column a bit to use change_column_default and match the otherScott Barron2005-12-201-9/+3
| | | | | | | methods. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3324 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Check for the key instead of the value, because it (the value) can be false.Scott Barron2005-12-201-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3322 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* PostgreSQL: more robust sequence name discovery. References #3087.Jeremy Kemper2005-12-081-3/+4
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3235 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* PostgreSQL: active? compatibility with the pure-Ruby driver. Still need to ↵Jeremy Kemper2005-11-281-2/+4
| | | | | | move connect into the adapter since postgres-pr doesn't support #reset. References #428. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3195 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* MySQL, PostgreSQL: reconnect! also reconfigures the connection. Otherwise, ↵Jeremy Kemper2005-11-221-4/+17
| | | | | | the connection 'loses' its settings if it times out and is reconnected. Closes #2978. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3165 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r3032@asus: jeremy | 2005-11-12 23:16:52 -0800Jeremy Kemper2005-11-131-0/+18
| | | | | | | | | Ticket 428 - stale connections r3040@asus: jeremy | 2005-11-13 00:22:29 -0800 When AbstractAdapter#log rescues an exception, attempt to detect and reconnect to an inactive database connection. Connection adapter must respond to the active? and reconnect! instance methods. Initial support for PostgreSQL. References #428. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3000 5ecf4fe2-1ee6-0310-87b1-e25e094e27de