X-Original-To: pgsql-interfaces-postgresql.org@localhost.postgresql.org Received: from localhost (neptune.hub.org [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 85EF6D1DF15 for ; Fri, 12 Dec 2003 09:59:42 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 02236-02 for ; Fri, 12 Dec 2003 05:59:12 -0400 (AST) Received: from druid.net (druid.net [216.126.72.98]) by svr1.postgresql.org (Postfix) with ESMTP id 9D467D1DF00 for ; Fri, 12 Dec 2003 05:59:10 -0400 (AST) Received: by druid.net (Postfix, from userid 1000) id DB9EC1A86; Fri, 12 Dec 2003 04:59:12 -0500 (EST) From: "D'Arcy J.M. Cain" To: dbuechel@tiscali.ch, pgsql-interfaces@postgresql.org Subject: Re: how to update a column Date: Fri, 12 Dec 2003 04:59:11 -0500 User-Agent: KMail/1.5.2 References: <3FC6F87D0000A464@mx1.tiscali.ch> In-Reply-To: <3FC6F87D0000A464@mx1.tiscali.ch> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200312120459.11582.darcy@druid.net> X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200312/34 X-Sequence-Number: 4643 On December 12, 2003 02:16 am, dbuechel@tiscali.ch wrote: > I want to update only one colomn ('cout') of a PostgreSQL table (table > name: aretes; colomns: gid, long, vit, acces, cout). For each line of the > table I calculate the 'cout' attribut with Python, then I want to update > the 'cout'attribut of each line with the new value. I tried with the update > function > of the pg module, but it wasn't sucessfull. > > Can anyone give me some help or an example of an update command? That's a pretty basic operation. Perhaps you can post some code that you are having trouble with and we can help you debug it. -- D'Arcy J.M. Cain | Democracy is three wolves http://www.druid.net/darcy/ | and a sheep voting on +1 416 425 1212 (DoD#0082) (eNTP) | what's for dinner.