X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 3540B52AF5 for ; Thu, 14 Jul 2005 06:24:32 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 30063-05 for ; Thu, 14 Jul 2005 09:24:23 +0000 (GMT) Received: from floppy.pyrenet.fr (news.pyrenet.fr [194.116.145.2]) by svr1.postgresql.org (Postfix) with ESMTP id 0B3DE52B80 for ; Thu, 14 Jul 2005 06:24:22 -0300 (ADT) Received: by floppy.pyrenet.fr (Postfix, from userid 106) id C8BE130B42; Thu, 14 Jul 2005 11:29:28 +0200 (MET DST) From: "Vivek" X-Newsgroups: pgsql.sql Subject: Yearly Archival System Using PostgreSQL Date: 14 Jul 2005 02:24:17 -0700 Organization: http://groups.google.com Lines: 12 Message-ID: <1121333057.572963.320670@z14g2000cwz.googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Complaints-To: groups-abuse@google.com User-Agent: G2/0.2 Complaints-To: groups-abuse@google.com Injection-Info: z14g2000cwz.googlegroups.com; posting-host=164.100.28.150; posting-account=CxwwIAwAAAC5JxXRjwLNTWEyoH4FTgQc To: pgsql-sql@postgresql.org X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200507/127 X-Sequence-Number: 22105 I am developing a database system using PostgreSQL in which I should be able to delete redundant records once a year (Time specified by the user). THe redundant records should be inserted into the archive table which is part of the same database. Is this possible in pgsql? Can I program a function in SQL or a trigger to fire when the computer switches on say Jan 1 of every year? Will be grateful if anybody could point me in the right direction. Vivek