Skip to content

Commit

Permalink
Fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
mmontagna committed Oct 2, 2021
1 parent 81298f0 commit 17a9ad5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/pgsync/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ def slop_options
o.boolean "--delete", "delete existing rows inside of a transaction", default: false
o.boolean "--truncate", "truncate existing rows", default: false
o.integer "--incremental", "only sync rows with an updated_at field great than this many seconds ago"
o.boolean "--no-temp-table", "create a permanent staging table", default: false

o.separator ""
o.separator "Foreign key options:"
Expand Down
2 changes: 1 addition & 1 deletion lib/pgsync/task.rb
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ def sync_data

# Protected by MVCC
if opts[:no_temp_table]
destination.execute("DELETE * FROM #{quote_ident_full(temp_table)}")
destination.execute("DELETE FROM #{quote_ident_full(temp_table)}")
end
log ({ table: table, updated_rows: result.length })
end
Expand Down

0 comments on commit 17a9ad5

Please sign in to comment.