Hers's one with the COPY command ...

From: The Hermit Hacker <scrappy(at)hub(dot)org>
To: pgsql-general(at)postgresql(dot)org
Subject: Hers's one with the COPY command ...
Date: 1999-11-23 01:07:24
Message-ID: Pine.BSF.4.10.9911222102080.14653-100000@thelab.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)hub(dot)org secondary: scrappy(at){freebsd|postgresql}.org

Responses

Browse pgsql-general by date

  From Date Subject
Next Message sciman-devd 1999-11-23 01:20:44
Previous Message Bruce Momjian 1999-11-23 00:56:56 European SANE conference needs speakers