Received: from davinci.ethosmedia.com (davinci.ethosmedia.com [209.10.40.250]) by postgresql.org (8.11.3/8.11.4) with ESMTP id f8JFoGe52472 for ; Wed, 19 Sep 2001 11:50:16 -0400 (EDT) (envelope-from josh@agliodbs.com) Received: from [209.10.40.250] (account ) by davinci.ethosmedia.com (CommuniGate Pro WebUser 3.4.1) with HTTP id 121814; Wed, 19 Sep 2001 08:50:10 -0700 From: "Josh Berkus" Subject: Re: Stored prosedure last run To: pkasimov@yahoo.com (Pasha), pgsql-sql@postgresql.org X-Mailer: CommuniGate Pro Web Mailer v.3.4.1 Date: Wed, 19 Sep 2001 08:50:10 -0700 Message-ID: In-Reply-To: <7a066f8b.0109171049.769576d2@posting.google.com> MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit X-Archive-Number: 200109/151 X-Sequence-Number: 4829 Pasha, > I'm trying to find if anyone knows how to find out when the stored > procedure was used last time (not created). If you want to do this, you'd need to create your own log table, and write to it at the beginning of your function: CREATE TABLE function_log ( run_id SERIAL NOT NULL PRIMARY KEY, function_name VARCHAR(100) NOT NULL, run_date TIMESTAMP NOT NULL DEFAULT current_timestamp); CREATE FUNCTION my_function ( ... ... BEGIN INSERT INTO function_log ( function_name ) VALUES ( 'my_function' ); ... Got it? -Josh ______AGLIO DATABASE SOLUTIONS___________________________ Josh Berkus Complete information technology josh@agliodbs.com and data management solutions (415) 565-7293 for law firms, small businesses fax 621-2533 and non-profit organizations. San Francisco