Does this function exist?

Started by Aaron Holtzalmost 27 years ago1 messagesgeneral
Jump to latest
#1Aaron Holtz
aholtz@bright.net

Wondering if there was a function to call back the previous command.
Por ejemplo:

test=> select * from data;
test=> select getlastcommand();
select * from data
(1 row)

test=>

Or something similiar. Anyone know how I can get that last command?
What I want to do is write a rule that takes the last command run and puts
it into another table or even into a flat text file on the drive. A poor
man's version of process accounting....

--------------------------------------------------------------------------
Aaron Holtz
ComNet Inc.
UNIX Systems Specialist
Email: aholtz@bright.net
"It's not broken, it just lacks duct tape."
--------------------------------------------------------------------------