Re: copy command and blobs

От: Tom Lane
Тема: Re: copy command and blobs
Дата: ,
Msg-id: 21060.1295557893@sss.pgh.pa.us
(см: обсуждение, исходный текст)
Ответ на: Re: copy command and blobs  (Mladen Gogala)
Список: pgsql-performance

Скрыть дерево обсуждения

copy command and blobs  (Madhu Ramachandran, )
 Re: copy command and blobs  (Mladen Gogala, )
  Re: copy command and blobs  (Tom Lane, )
  Re: copy command and blobs  (Madhu Ramachandran, )
   Re: copy command and blobs  (Robert Haas, )
    Re: copy command and blobs  (Greg Spiegelberg, )

Mladen Gogala <> writes:
> Madhu Ramachandran wrote:
>> i have a table with OID column.. I want to use the copy command to
>> insert bunch of rows (1 million).
>> but iam unable to specify the correct format for the oid type (i have
>> .jpg files to be stored in this column)..

> Huh? oid is a keyword, an automatically generated row id, and is
> deprecated. You shouldn't be doing anything with it, much less copying it.

I think what the OP actually means is he's thinking of importing some
images as large objects, then storing their OIDs in a user (not system)
column of type oid.  COPY can't be used for that though.

It might be better to use a bytea column, if you're willing to deal with
bytea's weird escaping rules.

            regards, tom lane


В списке pgsql-performance по дате сообщения:

От: Tom Lane
Дата:
Сообщение: Re: copy command and blobs
От: Robert Haas
Дата:
Сообщение: Re: "NOT IN" substantially slower in 9.0.2 than 8.3.13 - NOT EXISTS runs fast in both 8.3.13 and 9.0.2