Re: [PATCHES] COPY view

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [PATCHES] COPY view
Дата
Msg-id 20320.1156352061@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [PATCHES] COPY view  (Zoltan Boszormenyi <zboszor@dunaweb.hu>)
Ответы Re: [PATCHES] COPY view
Re: [PATCHES] COPY view
Список pgsql-hackers
[ cc list trimmed to something reasonable ]

Zoltan Boszormenyi <zboszor@dunaweb.hu> writes:
> OK, here's my current version. The reference leak is fixed.
> But as my testcase shows, it only works for single selects
> currently. The parser accepts it but COPY doesn't produce
> the expected output. Please, suggest a solution.

This patch seems to be adding a tremendous amount of duplicated code
in copy.c.  Why?

Also, moving checks for the relation case out of copy.c and into
analyze.c is inappropriate.  The checks you have moved there are
actually wrong because you have no lock on the relation at the time
you are checking.  You could perhaps take a lock at analyze time,
but frankly I see no reason for this patch to be messing with the
relation case at all.

As for the UNION problem, try passing the query to transformStmt
rather than prejudging where transformStmt will send it.  Compare for
instance the analyze.c code for ExplainStmt.
        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Tricky bugs in concurrent index build
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: [PATCHES] COPY view