Re: [COMMITTERS] pgsql: Automatic view update rules Bernd Helmle

From: Jaime Casanova <jcasanov(at)systemguards(dot)com(dot)ec>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Bernd Helmle <mailings(at)oopsware(dot)de>, Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [COMMITTERS] pgsql: Automatic view update rules Bernd Helmle
Date: 2009-01-23 23:07:38
Message-ID: 3073cc9b0901231507q2a201e57h6bc65b2a29832258@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

On Fri, Jan 23, 2009 at 5:32 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> Perhaps the right answer is to invent some new rule syntax to "redirect"
> inserts/updates/deletes, say something like
>
> on update to foo do instead redirect to bar
>
> and then put some logic that's not so much different from what you've
> got here into the rule engine itself ... or maybe better, just have the
> rule engine automatically try to redirect if it's faced with having to
> raise error for lack of a rule? It seems to me that the rule engine
> has probably got all the infrastructure needed to convert the query the
> way we'd like, we just don't have a suitable API to tell it to do that.
>

and what about default values? if we redirect we will have to use the
table's default (something i like) and AFAIU we won't have the ability
to change it for the view at least not without manually create a new
DO INSTEAD rule (something i don't like)...

i'm missing something? or can we implement such "REDIRECT" with the
ability to respect view's own defaults?

--
Atentamente,
Jaime Casanova
Soporte y capacitación de PostgreSQL
Asesoría y desarrollo de sistemas
Guayaquil - Ecuador
Cel. +59387171157

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Bernd Helmle 2009-01-23 23:18:20 Re: [COMMITTERS] pgsql: Automatic view update rules Bernd Helmle
Previous Message Jaime Casanova 2009-01-23 23:02:55 Re: [COMMITTERS] pgsql: Automatic view update rules Bernd Helmle

Browse pgsql-hackers by date

  From Date Subject
Next Message Bernd Helmle 2009-01-23 23:18:20 Re: [COMMITTERS] pgsql: Automatic view update rules Bernd Helmle
Previous Message Jaime Casanova 2009-01-23 23:02:55 Re: [COMMITTERS] pgsql: Automatic view update rules Bernd Helmle