Received: from pcr.ca (www.pcr.ca [207.139.158.13] (may be forged)) by hub.org (8.9.3/8.9.3) with ESMTP id MAA81424 for ; Wed, 12 Jan 2000 12:13:09 -0500 (EST) (envelope-from admin@wtbwts.com) Received: by pcr.ca (Postfix, from userid 1000) id 7E3B21FE8; Wed, 12 Jan 2000 12:12:07 +0000 (GMT) Received: from localhost (localhost [127.0.0.1]) by pcr.ca (Postfix) with ESMTP id 6A4761F8C for ; Wed, 12 Jan 2000 12:12:07 +0000 (GMT) Date: Wed, 12 Jan 2000 12:12:07 +0000 (GMT) From: admin X-Sender: admin@server.b0x.com To: pgsql-sql@postgresql.org Subject: stats on select Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII I would like to keep statistics for records which are being selected from my product table. If my table looks something like: CREATE TABLE product ( name varchar(32), stats int2 ); ... I would like to be able to increase product.stats when executing a query which could look something like: SELECT * FROM product WHERE name='3com' LIMIT 100,0; Considering there is a LIMIT, I can't simply use UPDATE. Perhaps I should be using rules or triggers, but I am not familiar with either. I have been reading the Programmer's Guide and I am still having a hard time figuring out the proper solution. Suggestions would be very appreciated, Marc