Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fix not-entirely-accurate comment about COPY FROM being "much faster"

lpsmith#3 (comment)

Performing INSERTs within a transaction block is much faster than without, but
is still slower than COPY.  Also, multiple rows can be inserted with a single
INSERT statement:

    INSERT INTO tablename (id, col1, col2) VALUES
        (1, 0, 1),
        (2, 1, 0),
        (3, 1, 1);
  • Loading branch information...
commit f518bde108f89fdede339830bbad8151d60e6897 1 parent 5ab97d9
joeyadams authored

Showing 1 changed file with 2 additions and 2 deletions. Show diff stats Hide diff stats

  1. +2 2 Database/PostgreSQL/LibPQ.hsc
4 Database/PostgreSQL/LibPQ.hsc
@@ -1519,8 +1519,8 @@ unescapeBytea bs =
1519 1519 -- $copyfrom
1520 1520 --
1521 1521 -- This provides support for PostgreSQL's @COPY FROM@ facility. When inserting
1522   --- rows in bulk, @COPY FROM@ is /much/ faster than individual @INSERT@
1523   --- statements.
  1522 +-- rows in bulk, @COPY FROM@ is faster than individual @INSERT@ statements for
  1523 +-- each row.
1524 1524 --
1525 1525 -- For more information, see:
1526 1526 --

0 comments on commit f518bde

Please sign in to comment.
Something went wrong with that request. Please try again.