Re: copy command and blobs - Mailing list pgsql-performance

From Tom Lane
Subject Re: copy command and blobs
Date
Msg-id 21060.1295557893@sss.pgh.pa.us
Whole thread Raw
In response to Re: copy command and blobs  (Mladen Gogala <mladen.gogala@vmsinfo.com>)
List pgsql-performance
Mladen Gogala <mladen.gogala@vmsinfo.com> 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 by date:

Previous
From: Mladen Gogala
Date:
Subject: Re: copy command and blobs
Next
From: Robert Haas
Date:
Subject: 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