Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #42316

Re: How to find bad row with db api executemany()?

Path csiph.com!usenet.pasdenom.info!news.albasani.net!news.stack.nl!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <python-python-list@m.gmane.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.004
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'insert': 0.05; 'postgresql': 0.07; 'mysql.': 0.09; 'performs': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'subject:How': 0.10; 'creates': 0.14; 'books': 0.15; '(it': 0.16; 'dump': 0.16; 'guys,': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'statements,': 0.16; 'sat,': 0.16; 'select': 0.22; 'load': 0.23; 'documented': 0.24; 'url:home': 0.24; 'equivalent': 0.26; 'extension': 0.26; 'header:X -Complaints-To:1': 0.27; 'chris': 0.29; 'external': 0.29; 'matching': 0.30; 'especially': 0.30; 'usually': 0.31; 'loads': 0.31; 'table,': 0.31; 'file': 0.32; 'checked': 0.32; 'table': 0.34; 'subject:with': 0.35; 'common': 0.35; 'but': 0.35; 'charset :us-ascii': 0.36; 'received:76': 0.38; 'to:addr:python-list': 0.38; 'that,': 0.38; 'does': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'finally': 0.65; 'mar': 0.68; 'book,': 0.68; 'records': 0.73; '"hey,': 0.84; '"one': 0.84; 'differently:': 0.84; 'subject:find': 0.84; '2013': 0.98
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Dennis Lee Bieber <wlfraed@ix.netcom.com>
Subject Re: How to find bad row with db api executemany()?
Date Sat, 30 Mar 2013 00:19:43 -0400
Organization > Bestiaria Support Staff <
References <F40EFF8D-9F4F-4ACB-8671-450F3CD761CA@panix.com> <5155E32A.1000403@davea.name> <mailman.3971.1364595940.2939.python-list@python.org> <roy-A61512.20410329032013@news.panix.com> <roy-1FF146.22445329032013@news.panix.com> <CAPTjJmq4E95Fe43J9NOMGHbWD6CNRE4omhxFMvUpOiq=oc=ZeQ@mail.gmail.com>
Mime-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Transfer-Encoding 7bit
X-Gmane-NNTP-Posting-Host adsl-76-249-26-43.dsl.klmzmi.sbcglobal.net
X-Newsreader Forte Agent 3.3/32.846
X-No-Archive YES
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.3987.1364617199.2939.python-list@python.org> (permalink)
Lines 29
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1364617199 news.xs4all.nl 6858 [2001:888:2000:d::a6]:56660
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:42316

Show key headers only | View raw


On Sat, 30 Mar 2013 13:49:56 +1100, Chris Angelico <rosuav@gmail.com>
declaimed the following in gmane.comp.python.general:


> Especially facepalm because there's some way to do this that's faster
> than straight INSERT statements, and it's not clearly documented as
> "hey, guys, if you want to dump loads of data in, use COPY instead"
> (it might be that, I don't know, but usually COPY isn't directly
> transliterable with INSERT).
>

	While COPY is found in my ancient PostgreSQL book, I don't find it
in MySQL. I suspect the equivalent is LOAD DATA INFILE. Firebird goes
completely differently: one does a CREATE TABLE exttable EXTERNAL FILE
"fixed-length.txt" (table definition), then creates a matching internal
table, and finally performs an INSERT INTO internal SELECT fields FROM
exttable.

	I think MySQL is the only common DBMS with an extension on INSERT of
allowing multiple records (I've not checked my Access 2010 docs, and my
MSDE/SQL-Server books are in storage -- but SQLite3, Firebird, and
PostgreSQL all seem to be "one INSERT = one record").



-- 
	Wulfraed                 Dennis Lee Bieber         AF6VN
        wlfraed@ix.netcom.com    HTTP://wlfraed.home.netcom.com/

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: How to find bad row with db api executemany()? Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2013-03-29 18:25 -0400
  Re: How to find bad row with db api executemany()? Roy Smith <roy@panix.com> - 2013-03-29 20:41 -0400
    Re: How to find bad row with db api executemany()? Chris Angelico <rosuav@gmail.com> - 2013-03-30 11:57 +1100
      Re: How to find bad row with db api executemany()? Roy Smith <roy@panix.com> - 2013-03-29 21:19 -0400
        Re: How to find bad row with db api executemany()? Chris Angelico <rosuav@gmail.com> - 2013-03-30 13:05 +1100
        Re: How to find bad row with db api executemany()? Tim Chase <python.list@tim.thechases.com> - 2013-03-29 22:17 -0500
        Re: How to find bad row with db api executemany()? (PS) Tim Chase <python.list@tim.thechases.com> - 2013-03-29 22:38 -0500
        Re: How to find bad row with db api executemany()? Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2013-03-29 23:38 -0400
    Re: How to find bad row with db api executemany()? Roy Smith <roy@panix.com> - 2013-03-29 22:44 -0400
      Re: How to find bad row with db api executemany()? Chris Angelico <rosuav@gmail.com> - 2013-03-30 13:49 +1100
        Re: How to find bad row with db api executemany()? Roy Smith <roy@panix.com> - 2013-03-29 23:09 -0400
          Re: How to find bad row with db api executemany()? Chris Angelico <rosuav@gmail.com> - 2013-03-30 14:14 +1100
            Re: How to find bad row with db api executemany()? Roy Smith <roy@panix.com> - 2013-03-29 23:36 -0400
              Re: How to find bad row with db api executemany()? Chris Angelico <rosuav@gmail.com> - 2013-03-30 14:57 +1100
                Re: How to find bad row with db api executemany()? Roy Smith <roy@panix.com> - 2013-03-30 00:10 -0400
                Re: How to find bad row with db api executemany()? Chris Angelico <rosuav@gmail.com> - 2013-03-30 15:21 +1100
                Re: How to find bad row with db api executemany()? Roy Smith <roy@panix.com> - 2013-03-30 10:19 -0400
        Re: How to find bad row with db api executemany()? rusi <rustompmody@gmail.com> - 2013-03-29 20:13 -0700
          Re: How to find bad row with db api executemany()? rusi <rustompmody@gmail.com> - 2013-03-29 20:15 -0700
          Re: How to find bad row with db api executemany()? Roy Smith <roy@panix.com> - 2013-03-29 23:40 -0400
      Re: How to find bad row with db api executemany()? Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2013-03-29 23:53 -0400
      Re: How to find bad row with db api executemany()? Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2013-03-30 00:19 -0400
      Re: How to find bad row with db api executemany()? Chris Angelico <rosuav@gmail.com> - 2013-03-30 15:24 +1100
      Re: How to find bad row with db api executemany()? Tim Chase <python.list@tim.thechases.com> - 2013-03-30 06:38 -0500

csiph-web