Hers's one with the COPY command ...

Поиск
Список
Период
Сортировка
От The Hermit Hacker
Тема Hers's one with the COPY command ...
Дата
Msg-id Pine.BSF.4.10.9911222102080.14653-100000@thelab.hub.org
обсуждение исходный текст
Ответы Re: [GENERAL] Hers's one with the COPY command ...  (Lincoln Yeoh <lylyeoh@mecomb.com>)
Список pgsql-general
I have a table created as:

=============
DROP TABLE referer_raw_data;
CREATE TABLE referer_raw_data (
        counter_id int4,
        referer_url_domain varchar(256),
        referer_counter int4,
        date_added datetime default now());
=============

I wish to copy a stream of data to it as:

5\thttp://thissite\t3\t...

where the date *isn't* part of the copy, since I want to set it as the
date that the record was added...is this possible?   now, from the docs, I
realize that it will ignore the default, which I'm okay with, but is there
a way of passing it now(), or something similar, to set the data?

basically, I want to stream web data to the backend as fast as the backend
will take it, with COPY TO being faster then INSERT INTO, but don't want
to have to "create a date" to insert at the same time...

Marc G. Fournier                   ICQ#7615664               IRC Nick: Scrappy
Systems Administrator @ hub.org
primary: scrappy@hub.org           secondary: scrappy@{freebsd|postgresql}.org


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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: European SANE conference needs speakers
Следующее
От: sciman-devd@21cn.com
Дата:
Сообщение: