Re: COPY into a view; help w. design & patch

Поиск
Список
Период
Сортировка
От Karl O. Pinc
Тема Re: COPY into a view; help w. design & patch
Дата
Msg-id 1179766949l.2547l.0l@mofo
обсуждение исходный текст
Ответ на Re: COPY into a view; help w. design & patch  ("Jim C. Nasby" <decibel@decibel.org>)
Ответы Re: COPY into a view; help w. design & patch  ("Jim C. Nasby" <decibel@decibel.org>)
Список pgsql-hackers
On 05/21/2007 11:23:57 AM, Jim C. Nasby wrote:

> What about adding COPY support to rules? ISTM if you want to copy into
> a
> view you probably want to insert into it as well, so why not use the
> same mechanism? Presumably a COPY rule would also be faster than a
> trigger.

I'd say there's no difference between the rule you'd use
for COPYing and the rule you'd use for INSERTing,
which is why my patch produces an
INSERT statement and then proceeds to (attempt
to) execute the statement for every row of data
to be copied.  If you don't have a rule that allows
INSERT into the view you get (the already existing)
error with a hint that tells you to make an INSERT
rule.

Karl <kop@meme.com>
Free Software:  "You don't pay back, you pay forward."                 -- Robert A. Heinlein



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

Предыдущее
От: "Jim C. Nasby"
Дата:
Сообщение: Re: COPY into a view; help w. design & patch
Следующее
От: "Jim C. Nasby"
Дата:
Сообщение: Re: COPY into a view; help w. design & patch