Re: merge command - GSoC progress

Поиск
Список
Период
Сортировка
От Boxuan Zhai
Тема Re: merge command - GSoC progress
Дата
Msg-id AANLkTima00ryh7OBzVkZDoSB-SeDX4HLhcKQNROungAv@mail.gmail.com
обсуждение исходный текст
Ответ на Re: merge command - GSoC progress  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: merge command - GSoC progress  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers


2010/7/28 Robert Haas <robertmhaas@gmail.com>
On Tue, Jul 27, 2010 at 1:04 AM, Boxuan Zhai <bxzhai2010@gmail.com> wrote:
> I have get a edition that the merge command can run. It accept the standard
> merge command and can do UPDATE, INSERT and DELETE actions now. But we
> cannot put additional qualification for actions. There are some bugs when we
> try to evaluate the quals which make the system quit. I will fix it soon.

This patch doesn't compile.  You're using zbxprint() from a bunch of
places where it's not defined.  I get compile warnings for all of
those files and then a link failure at the end.  You might find it
useful to create src/Makefile.custom in your local tree and put
COPT=-Werror in there; it tends to prevent problems of this kind.

Undefined symbols:
 "_zbxprint", referenced from:
     _transformStmt in analyze.o
     _ExecInitMergeAction in nodeModifyTable.o
     _ExecModifyTable in nodeModifyTable.o
     _ExecInitModifyTable in nodeModifyTable.o
     _merge_action_planner in planner.o

Sorry, this is a debug function defined by me. It may not be included in the patch. I add a line of "#define zbxprint printf" somewhere in the system.
 
Not that it's as high-priority as getting this fully working, but you
should revert the useless changes in this patch - e.g. the one-line
change to heaptuple.c is obvious debugging leftovers, and all of the
changes to execQual.c and execUtil.c are whitespace-only.  You should
also try to make your code and comments conform to project style
guidelines.  In general, you'll find it easier to keep track of your
changes (and you'll have fewer spurious changes) if you use git diff
master...yourbranch instead of marking comments, etc. with ZBX or
similar.

 
 
I will clean all these in my next patch.  
 
I am now very confused with the failure of action qualification. I look through the whole process of a query, from parser to executor. In my opinion, the qualification transformed in analyzer, will be processed by prepsocess_qual_condition() in planner, and then by the ExecInitExpr() function in excutor start phase (in InitPlan() function). Then the qual is ready to be used in ExecQual(). Am I correct?
 
I have done these on the merge action qual, but when I pass them into ExecQual(), the server just closed abnormally. I don't know if I missed any steps on preparing  the qual expressions.  
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise Postgres Company

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

Предыдущее
От: Dimitri Fontaine
Дата:
Сообщение: Re: Query optimization problem
Следующее
От: Robert Haas
Дата:
Сообщение: Re: merge command - GSoC progress