Re: BUG #2437: Rules for COPY

Поиск
Список
Период
Сортировка
От Jim C. Nasby
Тема Re: BUG #2437: Rules for COPY
Дата
Msg-id 20060515184600.GW26212@pervasive.com
обсуждение исходный текст
Ответ на Re: BUG #2437: Rules for COPY  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
On Mon, May 15, 2006 at 09:50:57AM -0400, Tom Lane wrote:
> "Anton Fedorov" <datacompboy@mail.ru> writes:
> > Looks like COPY bypass rules 'ON INSERT INSTEAD'.
>
> That's the documented behavior.  We're unlikely to change it because
> it'd slow COPY down substantially, which'd negate its main use of being
> a bulk data loading mechanism.

http://pgfoundry.org/projects/pgloader/ might allow for using inserts
and therefore firing ON INSERT rules. Another option is to COPY into a
temporary table, and then to INSERT INTO.

The problem with COPY not firing ON INSERT is that COPY is the only
convenient way to load data in that doesn't already happen to be
formatted as INSERT statements, so it would be nice if there was an
option that allowed you to have it follow normal INSERT conventions. Or
perhaps if there was a utility that allowed reading from an on-disk file
as if it was a table... I know Oracle has that ability, maybe
EnterpriseDB has it as well...
--
Jim C. Nasby, Sr. Engineering Consultant      jnasby@pervasive.com
Pervasive Software      http://pervasive.com    work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf       cell: 512-569-9461

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

Предыдущее
От: "Jim C. Nasby"
Дата:
Сообщение: Re: BUG #2431: Error:SELECT query has no destination for result data
Следующее
От: "Jim C. Nasby"
Дата:
Сообщение: Re: postgresql-[any version] from FreeBSD ports - startup problems after crash