X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id E4563D1B514; Fri, 7 Nov 2003 23:00:08 +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 20756-03; Fri, 7 Nov 2003 18:59:40 -0400 (AST) Received: from hotmail.com (bay8-f55.bay8.hotmail.com [64.4.27.55]) by svr1.postgresql.org (Postfix) with ESMTP id 7DFE7D1B518; Fri, 7 Nov 2003 18:59:37 -0400 (AST) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Fri, 7 Nov 2003 14:59:39 -0800 Received: from 64.76.61.207 by by8fd.bay8.hotmail.msn.com with HTTP; Fri, 07 Nov 2003 22:59:39 GMT X-Originating-IP: [64.76.61.207] X-Originating-Email: [el_vigia_ec@hotmail.com] From: "Jaime Casanova" To: pgsql-general@postgresql.org, pgsql-admin@postgresql.org, pgsql-hackers@postgresql.org Subject: Re: [GENERAL] [HACKERS] retrieve statement from catalogs Date: Fri, 07 Nov 2003 22:59:39 +0000 Mime-Version: 1.0 Content-Type: text/plain; format=flowed Message-ID: X-OriginalArrivalTime: 07 Nov 2003 22:59:40.0005 (UTC) FILETIME=[D2F41950:01C3A582] X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200311/132 X-Sequence-Number: 11120 Hi everybody, can anyone tell me if there's a way to retrieve the select instruction executed from the catalogs, or maybe via some structure in a trigger? The reason is that i have some selects constructed on-the-fly (just part of it) and i want to save that in a table in order to know what are the most used for optimizing them. Another reason for doing that is that i don't know all the selects in the program nor the page and this is an easier solution than examine all the code. thanx in advance, el_vigia _________________________________________________________________ Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963