Skip to content

Commit

Permalink
Merge pull request #3 from patterninc/fix-odbc-error
Browse files Browse the repository at this point in the history
Fixing ArgumentError (negative string size (or size too big)) error
  • Loading branch information
jasonwells authored Feb 13, 2023
2 parents 2f3b4f6 + e1ff722 commit 31e866e
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions lib/odbc_adapter/adapters/postgresql_odbc_adapter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,11 @@ def quote_string(string)
end

def disable_referential_integrity
execute(tables.map { |name| "ALTER TABLE #{quote_table_name(name)} DISABLE TRIGGER ALL" }.join(';'))
yield
ensure
execute(tables.map { |name| "ALTER TABLE #{quote_table_name(name)} ENABLE TRIGGER ALL" }.join(';'))
#execute(tables.map { |name| "ALTER TABLE #{quote_table_name(name)} DISABLE TRIGGER ALL" }.join(';'))
#yield
#ensure
#execute(tables.map { |name| "ALTER TABLE #{quote_table_name(name)} ENABLE TRIGGER ALL" }.join(';'))
[]
end

# Create a new PostgreSQL database. Options include <tt>:owner</tt>,
Expand Down

0 comments on commit 31e866e

Please sign in to comment.