lib/pgslice/cli/swap.rb in pgslice-0.5.0 vs lib/pgslice/cli/swap.rb in pgslice-0.6.0
- old
+ new
@@ -18,10 +18,10 @@
table.sequences.each do |sequence|
queries << "ALTER SEQUENCE #{quote_ident(sequence["sequence_schema"])}.#{quote_ident(sequence["sequence_name"])} OWNED BY #{quote_table(table)}.#{quote_ident(sequence["related_column"])};"
end
- queries.unshift("SET LOCAL lock_timeout = '#{options[:lock_timeout]}';") if server_version_num >= 90300
+ queries.unshift("SET LOCAL lock_timeout = #{escape_literal(options[:lock_timeout])};")
run_queries(queries)
end
end
end