Received: from lee.k12.nc.us (IDENT:root@shomer.lee.k12.nc.us [207.4.71.118]) by hub.org (8.9.2/8.9.1) with ESMTP id IAA96023 for ; Wed, 10 Mar 1999 08:14:34 -0500 (EST) (envelope-from joden@lee.k12.nc.us) Received: from lee.k12.nc.us ([10.0.0.1]) by lee.k12.nc.us (8.9.1a/8.9.1) with ESMTP id IAA19854; Wed, 10 Mar 1999 08:13:46 -0500 Message-ID: <36E670EA.749A3E26@lee.k12.nc.us> Date: Wed, 10 Mar 1999 08:17:30 -0500 From: James Olin Oden Organization: Lee County Schools X-Mailer: Mozilla 4.5 [en] (Win95; I) X-Accept-Language: en MIME-Version: 1.0 To: vikrant@neuronetin.com CC: pgsql-interfaces@postgreSQL.org Subject: Re: [INTERFACES] Retrieve rows 1 by 1 References: <36E5EA38.F88061AF@chemquick.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Vikrant Rathore wrote: > Please any one can tell me how to update,insert or change a single row > using libpq interface. The table is not indexed and do not have a > primary key. > Can any one give me a way to retrieve,chage or insert data after any > row. > Thanks in advance > Vikrant I am not familiar enough with libq to give you the specifics, but I think the key is to realize that though you do not have primary key, every object in a table has an oid (Object ID) that postgress assigns it that is unique. So when you do a select be sure to include the oid field, and then you can update that specific record easily by specifying that" oid = #### That is whatever number you pulled from the database with your select. As for the specifics the various docs on the website I believe describe the libq interface very well (I just have never used it so I don't remember it) so that you can fill in the specifics for yourself. ...james