pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Stored prosedure last run
3+ messages / 3 participants
[nested] [flat]

* Stored prosedure last run
@ 2001-09-17 18:49  Pasha <pkasimov@yahoo.com>
  0 siblings, 2 replies; 3+ messages in thread

From: pkasimov@yahoo.com @ 2001-09-17 18:49 UTC (permalink / raw)
  To: pgsql-sql

Hello to Every1.
I'm trying to find if anyone knows how to find out when the stored
procedure was used last time (not created).

Thank You.



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Stored prosedure last run
@ 2001-09-18 23:21  Stephan Szabo <sszabo@megazone23.bigpanda.com>
  parent: Pasha <pkasimov@yahoo.com>
  1 sibling, 0 replies; 3+ messages in thread

From: Stephan Szabo @ 2001-09-18 23:21 UTC (permalink / raw)
  To: Pasha <pkasimov@yahoo.com>; +Cc: pgsql-sql

On 17 Sep 2001, Pasha wrote:

> Hello to Every1.
> I'm trying to find if anyone knows how to find out when the stored
> procedure was used last time (not created).

I don't think there's any real way to do that apart from having your
procedure keep track of that itself.




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Stored prosedure last run
@ 2001-09-19 15:50  Josh Berkus <josh@agliodbs.com>
  parent: Pasha <pkasimov@yahoo.com>
  1 sibling, 0 replies; 3+ messages in thread

From: Josh Berkus @ 2001-09-19 15:50 UTC (permalink / raw)
  To: pkasimov@yahoo.com; pgsql-sql

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



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2001-09-19 15:50 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-09-17 18:49 Stored prosedure last run Pasha <pkasimov@yahoo.com>
2001-09-18 23:21 ` Stephan Szabo <sszabo@megazone23.bigpanda.com>
2001-09-19 15:50 ` Josh Berkus <josh@agliodbs.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox