Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: dieter Newsgroups: comp.lang.python Subject: Re: Commit: postgres on cursor and sqlite on connection Date: Tue, 10 Nov 2015 07:53:56 +0100 Lines: 15 Message-ID: References: <878u675g9q.fsf@Equus.decebal.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: news.uni-berlin.de LhX75csHUFimSJu0+hS5Awp3pMJjZtKKyTgJjuFBoLHA== Cancel-Lock: sha1:SzujAc0Q5k2FiUmUKxEGQRNE6i0= Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.006 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'true,': 0.04; 'libraries.': 0.09; 'postgres': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'sqlite': 0.09; 'received:80.91.229.3': 0.16; 'received:dip0.t-ipconnect.de': 0.16; 'received:io': 0.16; 'received:plane.gmane.org': 0.16; 'received:psf.io': 0.16; 'received:t-ipconnect.de': 0.16; 'written': 0.24; 'header:User- Agent:1': 0.26; 'header:X-Complaints-To:1': 0.26; 'interface': 0.29; 'looks': 0.29; 'code': 0.30; 'something': 0.35; 'but': 0.36; 'there': 0.36; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'received:org': 0.37; 'charset:us-ascii': 0.37; 'doing': 0.38; 'several': 0.38; 'to:addr:python.org': 0.40; 'received:de': 0.40; 'some': 0.40; 'between': 0.65; 'differences': 0.66; 'received:217': 0.66; 'cecil': 0.84; 'westerhof': 0.84 X-Injected-Via-Gmane: http://gmane.org/ X-Gmane-NNTP-Posting-Host: pd9e09362.dip0.t-ipconnect.de User-Agent: Gnus/5.1008 (Gnus v5.10.8) XEmacs/21.4.22 (linux) X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com comp.lang.python:98577 Cecil Westerhof writes: > I have written some code I like to use with several databases. At the > moment sqlite and postgres. It looks like with progres I can use: > cursor.execute('COMMIT;') > but that with sqlite I need to use: > conn.commit() > > Is this true, or am I doing something wrong? There might be differences between various database interface libraries. I am using "psycopg" to interface with Postgres - and which it, you can also use "conn.commit" (as with "sqlite").