Re: rewriter in updateable views

Поиск
Список
Период
Сортировка
От Simon Riggs
Тема Re: rewriter in updateable views
Дата
Msg-id 1111999912.11750.881.camel@localhost.localdomain
обсуждение исходный текст
Ответ на Re: rewriter in updateable views  (Jaime Casanova <systemguards@gmail.com>)
Ответы Re: rewriter in updateable views
Список pgsql-hackers
On Sun, 2005-03-27 at 23:12 -0500, Jaime Casanova wrote:
> On Sat, 19 Mar 2005 11:42:18 +0000, Simon Riggs <simon@2ndquadrant.com> wrote:
> > I can see that I might want the view to have a different default value
> > from that of the underlying table. I can see a reason to have multiple
> > updateable views on the same table, all with different columns, column
> > defaults and row selection clauses. (Multiple classes all held within
> > the same physical table, for example).
> > 
> > I'd suggest - if the default value for a column on a view IS NOT set,
> > then use the default value from the underlying table. If it IS set, then
> > it should stay set, even if the underlying table changes. That might
> > need some dependency logic in there...
> > 
> I think i can do this within rewriterHandle.c:build_column_default
> immediatly after the first try i can ask if expr == NULL and if is it
> a view if  so my code start looking for defaults on base tables maybe
> using something like the parse_relation.c:colNameToVar function to
> identify the column. there is a better way to do it? also the
> ParseState parameter is extensively used in the colNameToVar function
> but i can't find what is it.

ParseState is defined in src/include/parser/parse_node.h

I'm not sure I can comment further.

If you have everything else working, it might be worth submitting a
patch for review? There may be other things required also.

Best Regards, Simon Riggs



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

Предыдущее
От: imad
Дата:
Сообщение: Executing Anonymous Blocks
Следующее
От: Palle Girgensohn
Дата:
Сообщение: Re: Patch for collation using ICU