DefineQueryRewrite: rule plan string too big.

Поиск
Список
Период
Сортировка
От Theo Kramer
Тема DefineQueryRewrite: rule plan string too big.
Дата
Msg-id 3883271B.518645BA@flame.co.za
обсуждение исходный текст
Список pgsql-hackers
Hi

Just created a rule and received "rule plan string too big". My rule is around
1000 characters long. I added a debug statement which printed the following from
backend/rewrite/rewriteDefine.c
sizeof(FormData_pg_rewrite) = 60, strlen(actionbuf) = 6328, strlen(qualbuf) = 4279, MaxAttrSize = 8104

so my rule expands to 10667 characters.

Questions I have
1.  Is it feasable to increase MaxAttrSize without upsetting the applecart?

2.  Does this limitation not severely restrict setting up of rules? Ie. I   want to log any update on any field made to
a16 attribute table.
 
   The rule is as follows
     create rule log_accounts as on update to accounts     where new.domain != old.domain or       new.RegistrationDate
!=old.RegistrationDate or       new.RegistrationType != old.RegistrationType or       new.Amount != old.Amount or
new.BillingType!= old.BillingType or       new.ContactEmail != old.ContactEmail or       new.PaperDate != old.PaperDate
or      new.PaymentDate != old.PaymentDate or       new.InvoiceCount != old.InvoiceCount or       new.InvoiceNo !=
old.InvoiceNoor       new.ContractType != old.ContractType or       new.Organisation != old.Organisation or
new.Payed!= old.Payed     do insert into accounts_log values (       getpgusername(),      'now'::text,
new.domain,     new.RegistrationDate,      new.RegistrationType,      new.Amount,      new.BillingType,
new.ContactEmail,     new.PaperDate,      new.PaymentDate,      new.InvoiceCount,      new.InvoiceNo,
new.ContractType,     new.Organisation,      new.Payed,      new.PaperContract    );
 

3.  Is there a better way to do this?

TIA
--------
Regards
Theo


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Jose Soares
Дата:
Сообщение: Re: [HACKERS] Re: Informix and OUTER join syntax
Следующее
От: Hakan Tandogan
Дата:
Сообщение: Re: [HACKERS] Auto-lowercasing of column names?