Rule for all the tables in a schema

From: Sajeev Mayandi <Sajeev_Mayandi(at)symantec(dot)com>
To: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Rule for all the tables in a schema
Date: 2013-05-23 05:34:46
Message-ID: CDC2FA11.42316%sajeev_mayandi@symantec.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

I am in the process of creating a rule that provides upsert functionality for all the tables which has primary key. The issue here is we have some 50 to 60 odd tables and have to write a functions that iterates through all these tables , create rules for each of this table, so that the rule body provides upsert functionality for every one of them.

Is there a way, I can say create a rule for all the tables in an schema? This will avoid writing complicated functions.

Thanks,

Sajeev

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Sergey Konoplev 2013-05-23 06:13:44 Re: Rule for all the tables in a schema
Previous Message Richard Onorato 2013-05-23 02:17:18 Re: Table Partitioning