mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
PostgreSQL: correctly quote the ' in pk_and_sequence_for. Closes #5462.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4580 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
*SVN*
|
||||
|
||||
* PostgreSQL: correctly quote the ' in pk_and_sequence_for. #5462 [tietew@tietew.net]
|
||||
|
||||
* PostgreSQL: correctly quote microseconds in timestamps. #5641 [rick@rickbradley.com]
|
||||
|
||||
* Clearer has_one/belongs_to model names (account has_one :user). #5632 [matt@mattmargolis.net]
|
||||
|
||||
@@ -303,7 +303,7 @@ module ActiveRecord
|
||||
# the 8.1+ nextval('foo'::regclass).
|
||||
# TODO: assumes sequence is in same schema as table.
|
||||
result = query(<<-end_sql, 'PK and custom sequence')[0]
|
||||
SELECT attr.attname, name.nspname, split_part(def.adsrc, '\\\'', 2)
|
||||
SELECT attr.attname, name.nspname, split_part(def.adsrc, '''', 2)
|
||||
FROM pg_class t
|
||||
JOIN pg_namespace name ON (t.relnamespace = name.oid)
|
||||
JOIN pg_attribute attr ON (t.oid = attrelid)
|
||||
|
||||
Reference in New Issue
Block a user