Re: Question about copy from with timestamp format

Поиск
Список
Период
Сортировка
От Jim Nasby
Тема Re: Question about copy from with timestamp format
Дата
Msg-id 55C19D8A.1020403@BlueTreble.com
обсуждение исходный текст
Ответ на Re: Question about copy from with timestamp format  (Alban Hertroys <haramrae@gmail.com>)
Ответы Re: Question about copy from with timestamp format
Список pgsql-general
On 7/30/15 3:09 PM, Alban Hertroys wrote:
> COPY is a bit special, I'm afraid. For starters, although it works_like_  doing a bunch of INSERTs, it doesn't
performactual INSERTs. Apparently, that also means it won't fire an INSERT rule and thus can't be used with an
updatableview. There are no rules on such a view (rules rewrite the query) that would work for COPY. 
>
> Now perhaps that sounds like a COPY rule is warranted for cases like these, but that doesn't help, exactly because
theCOPY command has no place in its syntax for expressions (such as this type conversion). INSERT does, hence we can
writea rule for it… 
>
> In hindsight it all makes sense. That doesn't bring you any closer to a solution, unfortunately.

By the way, if you're desperate enough to make this work during copy,
you could create a new type that understands that time format. It'd
involve some C coding though.

It would be nice if there was a way to do transforms during COPY. I
vaguely remember some discussion of that on hackers some time ago.
--
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Data in Trouble? Get it in Treble! http://BlueTreble.com


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

Предыдущее
От: Jim Nasby
Дата:
Сообщение: Re: Transaction ID Wraparound Monitoring
Следующее
От: Johann Spies
Дата:
Сообщение: idle processes