Here are the simple things I did
create table state (
state_code char(2) not null,
state varchar(15) not null,
primary key (state_code)
);
create table whitepage (
user_id char(8) not null,
email varchar(50),
telephone char(16) not null,
contact_namevarchar(30) not
I have some tables with huge data.
The tables have column timestamp and float.
I am try to keep up to 6 day of data values.
What I do is execute SQL below from crontab (UNIX to
schedule commands).
BEGIN;
DELETE FROM table_1 WHERE column_time ('now'::timestamp - '6
days'::interval);
.
I am use Postgres 7.1 going to upgrade to 7.2 run in Redhat Linux 7.2.
Each time user do update, insert and delete will save to the logfile,
right?
1) Where is that log file?
2 ) How do I do partial dump the log file in SQL statements?
For example, I want to dump all log
from 6:00 to 9:00 ,
Previous DBA create a lot of triggers and functions without
documentation like:
CREATE TRIGGER trigger_name [BEFORE | AFTER] event ON table_name
FOR EACH ROW EXECUTE PROCEDURE function_name();
Now he is gone I couldn't find his PL/PGSQL source codes!
I can do
SELECT * FROM pg_proc;
SELECT *