Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 474151337B61 for ; Thu, 20 Jan 2011 17:11:41 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 27681-07 for ; Thu, 20 Jan 2011 21:11:34 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id D41921337B51 for ; Thu, 20 Jan 2011 17:11:33 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id p0KLBX6A021061; Thu, 20 Jan 2011 16:11:33 -0500 (EST) To: Mladen Gogala cc: Madhu Ramachandran , "pgsql-performance@postgresql.org" Subject: Re: copy command and blobs In-reply-to: <4D389854.80603@vmsinfo.com> References: <4D389854.80603@vmsinfo.com> Comments: In-reply-to Mladen Gogala message dated "Thu, 20 Jan 2011 15:17:24 -0500" Date: Thu, 20 Jan 2011 16:11:33 -0500 Message-ID: <21060.1295557893@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201101/192 X-Sequence-Number: 41979 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