Re: [GENERAL] Howto prevent write based on date

2005-05-08 Thread Fmiser
rumor has it that Richard wrote: > Franco Bruno Borghesi wrote: > > You could write a trigger like this: > > > > > > CREATE OR REPLACE FUNCTION checkDate() RETURNS TRIGGER LANGUAGE > > 'plpgsql' AS ' DECLARE > > limitDate DATE DEFAULT current_date-''1 year''::INTERVAL; > > BEGIN > > IF (

[GENERAL] Howto prevent write based on date

2005-05-05 Thread Fmiser
I'm a newbie to database admin, but I'm not afraid to try - but this one has me stumped. I'm using SQL-Ledger as a front end to postgresql 7.4.2. on (mostly) Debian Testing, i386. My fiscal year is over and I would _like_ to prevent any changes to the data from last year. I looked/searched in th