Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #4046: dump_postgresql_search_path_on_dump_schema_information.diff

File dump_postgresql_search_path_on_dump_schema_information.diff, 0.7 kB (added by bigsmoke@gmail.com, 3 years ago)

The actual patch file. I think it ought to be possible to attach a file from the submission interface.

  • activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb

    old new  
    223223        @schema_search_path ||= query('SHOW search_path')[0][0] 
    224224      end 
    225225 
     226      def dump_schema_information #:nodoc: 
     227        "SET search_path TO #{schema_search_path};\n\n" + super 
     228      end 
     229 
    226230      def default_sequence_name(table_name, pk = nil) 
    227231        default_pk, default_seq = pk_and_sequence_for(table_name) 
    228232        default_seq || "#{table_name}_#{pk || default_pk || 'id'}_seq"