Skip to content

Support for PostgreSQL citext data type.#12523

Merged
senny merged 1 commit into
rails:masterfrom
lsylvester:pg_citext
Mar 11, 2014
Merged

Support for PostgreSQL citext data type.#12523
senny merged 1 commit into
rails:masterfrom
lsylvester:pg_citext

Conversation

@lsylvester
Copy link
Copy Markdown
Contributor

citext makes it possible to use AR Hash finders for case-insensitive
matching as sql UPPER/LOWER functions are not needed.

This is an updated version of #9182 and #10231.

The schema.rb dumps now include citext columns and unknown OID warning that appeared in the test has been fixed by reconnecting to the database after the extension was enabled.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May you indent this code.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

None of the other create table statements in this file are indented. I think that it would be best to indent them all in a separate pull request if having them indented is preferred.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That PR will be rejected, as cosmetic changes. Better way to use code style for current changes.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is fine in the way it is. I already tried to change the style on this file and I don't think it is worth

@rafaelfranca
Copy link
Copy Markdown
Member

This pull request needs a rebase

@rafaelfranca
Copy link
Copy Markdown
Member

Could you add a test for the schema.rb dump. I didn't saw this being tested

@lsylvester
Copy link
Copy Markdown
Contributor Author

Rebased, and test for schema.rb dump has been added

@carlosantoniodasilva
Copy link
Copy Markdown
Member

@rafaelfranca do you have anything else to add here?

@robin850
Copy link
Copy Markdown
Member

robin850 commented Dec 7, 2013

@carlosantoniodasilva @rafaelfranca : What do you think about improving the documentation and adding a note about this feature in the "Ruby on Rails 4.1 Release Notes" guide (if this will be in 4.1) ?

@exviva
Copy link
Copy Markdown
Contributor

exviva commented Dec 10, 2013

I'd also be interested in getting this merged. Anything I can do to help?

@jalada
Copy link
Copy Markdown

jalada commented Dec 18, 2013

👍 I'm sad this got missed from 4.1; I'm getting bored of the citext errors in my console when I use it manually.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✂️

@carlosantoniodasilva
Copy link
Copy Markdown
Member

Can you rebase this from master? Thanks.

@rafaelfranca mind taking a look here? ❤️

@lsylvester
Copy link
Copy Markdown
Contributor Author

@carlosantoniodasilva Rebased

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should map it to OID::Text.new

@senny
Copy link
Copy Markdown
Member

senny commented Mar 8, 2014

@lsylvester can you push a rebased and squashed version of this PR? You can use brackets in the commit message to give credits to the authors:

git commit -m "register OID for PostgreSQL citex datatype [Author A & Author B]"

@lsylvester
Copy link
Copy Markdown
Contributor Author

@senny I have rebased

@senny
Copy link
Copy Markdown
Member

senny commented Mar 10, 2014

@lsylvester can we include citex_test.rb as the two referenced PR's do?

…ylvester]

citext makes it possible to use AR Hash finders for case-insensitive matching as sql UPPER/LOWER functions are not needed.
@lsylvester
Copy link
Copy Markdown
Contributor Author

@senny I have added a citext_test.rb.

@senny senny removed the openacademy label Mar 11, 2014
senny added a commit that referenced this pull request Mar 11, 2014
Support for PostgreSQL citext data type.
@senny senny merged commit 0e0b41d into rails:master Mar 11, 2014
@senny
Copy link
Copy Markdown
Member

senny commented Mar 11, 2014

@lsylvester thank you for your patience 💛

senny added a commit that referenced this pull request Mar 11, 2014
tenderlove added a commit that referenced this pull request Mar 13, 2014
* master: (108 commits)
  make tests pass on Ruby 2.2
  Use Sqlite3 adapter in examples
  use the body proxy to freeze headers
  just ask the response for the commit status, we do not need to ask the jar
  only write the jar if the response isn't committed
  Fix a grammatical error in the i18n guide [ci skip]
  use method_defined? to check whether or not a method is defined
  Enhance docs for update_attribute [ci-skip]
  Change usec to 0 on tests that compare seconds
  Unit test for mysql quote time usec
  Changelog entry for mysql56 microseconds
  Test microsecond on mysql 5.6
  MySQL 5.6 and later supports microsecond precision in datetime.
  [ci skip] Add documentation for original_fullpath.
  Remove mocking on save, when not necessary
  comment why we are modifying global state. [ci skip]
  `change_table` supports `citext`. Follow up to #12523.
  Removed unnecessary command "application"
  register OID for PostgreSQL citex datatype [Troy Kruthoff & Lachlan Sylvester]
  Fixes STI when 2+ levels deep.
  ...
prathamesh-sonpatki added a commit to prathamesh-sonpatki/exercism.io that referenced this pull request Mar 22, 2015
 - The registering of citext is no longer required because Rails 4.2
   added support for it in rails/rails#12523.
 - Also Rails 4.2 has locked minitest version to 5.5.1 so removed
   locking it to lower version in test_helper.
prathamesh-sonpatki added a commit to prathamesh-sonpatki/exercism.io that referenced this pull request Mar 22, 2015
 - The registering of citext is no longer required because Rails 4.2
   added support for it in rails/rails#12523.
 - Also Rails 4.2 has locked minitest version to 5.5.1 so removed
   locking it to lower version in test_helper.
treiff pushed a commit to treiff/exercism.io that referenced this pull request Aug 6, 2015
 - The registering of citext is no longer required because Rails 4.2
   added support for it in rails/rails#12523.
 - Also Rails 4.2 has locked minitest version to 5.5.1 so removed
   locking it to lower version in test_helper.
treiff pushed a commit to treiff/exercism.io that referenced this pull request Aug 15, 2015
 - The registering of citext is no longer required because Rails 4.2
   added support for it in rails/rails#12523.
 - Also Rails 4.2 has locked minitest version to 5.5.1 so removed
   locking it to lower version in test_helper.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants