Skip to content

Commit

Permalink
Add a hint to use type maps to Connection#copy_data
Browse files Browse the repository at this point in the history
Closes #571
  • Loading branch information
larskanis authored Jul 2, 2024
1 parent d072b21 commit ec9bd35
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/pg/connection.rb
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,10 @@ def inspect
# conn.put_copy_data ['more', 'data', 'to', 'copy']
# end
#
# Also PG::BinaryEncoder::CopyRow can be used to send data in binary format to the server.
# All 4 CopyRow classes can take a type map to specify how the columns are mapped to and from the database format.
# For details see the particular CopyRow class description.
#
# PG::BinaryEncoder::CopyRow can be used to send data in binary format to the server.
# In this case copy_data generates the header and trailer data automatically:
# enco = PG::BinaryEncoder::CopyRow.new
# conn.copy_data "COPY my_table FROM STDIN (FORMAT binary)", enco do
Expand Down

0 comments on commit ec9bd35

Please sign in to comment.