handleCopyOut (sample/psql.rb)

    # File sample/psql.rb, line 517
    def handleCopyOut(settings, copystream)
      copydone = FALSE

      while !copydone
        copybuf = settings.db.getline

        if !copybuf
          copydone = TRUE
        else
          if copybuf == "\\."
            copydone = TRUE
          else
            copystream.print(copybuf + "\n")
          end
        end
      end
      copystream.flush
      settings.db.endcopy
    end