Skip site navigation (1) Skip section navigation (2)

Re: I'm very confused.

From: Brant Fitzsimmons <brant(at)bfcomputerconsulting(dot)com>
To: Sean Davis <sdavis2(at)mail(dot)nih(dot)gov>
Cc: pgsql-novice(at)postgresql(dot)org, Jasbinder Singh Bali <jsbali(at)gmail(dot)com>
Subject: Re: I'm very confused.
Date: 2007-01-17 14:54:22
Message-ID: 45AE389E.3080902@bfcomputerconsulting.com (view raw or flat)
Thread:
Lists: pgsql-novice
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Sean Davis wrote:
> On Wednesday 17 January 2007 03:06, Brant Fitzsimmons wrote:
>> Jasbinder Singh Bali wrote:
>>> Please attach a snippet of your python script and lets see what
>>> are you doing there. That might make things easy. Jas
>> Here is the entire test script:
>>
>> #!/usr/bin/python
>>
>> # import pgdb module import pgdb
>>
>> # connect to the db db = pgdb.connect(host="localhost",
>> database="test", user="postgres", password="**********")
>>
>> # instantiate cursor cursor = db.cursor()
>>
>> # insert 10 records for x in range(10): cursor.execute("INSERT
>> INTO users (username, firstname, lastname, email, age) VALUES
>> ('brant', 'Brant', 'Fitzsimmons',
>> 'brant(at)bfcomputerconsulting(dot)com', 31)")
>
> Put in a db.commit() statement here.  Does that fix your problem?
It sure does.  Any idea why it would drive up the serial column even
though nothing was committed?

- --
Brant Fitzsimmons
brant(at)bfcomputerconsulting(dot)com
- -------------------------------------------------------------------
"Strange times are these in which we live when the old and the
young are taught falsehoods in the schools of learning. And the one
man that dares to tell the truth is called at once a lunatic and
a fool."
                            -Plato
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFrjidDpzwx2t8E5gRAqK5AJsFcboXs3HK8uAyURI+PdwQeeh6UACeOu4l
GOtN3HuN6vba4IzeCvFpWWc=
=BUCF
-----END PGP SIGNATURE-----

In response to

Responses

pgsql-novice by date

Next:From: Sean DavisDate: 2007-01-17 14:57:56
Subject: Re: I'm very confused.
Previous:From: Jasbinder Singh BaliDate: 2007-01-17 12:32:56
Subject: Re: I'm very confused.

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group