Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1aKTP0-0005HW-Vn for pgsql-sql@arkaria.postgresql.org; Sat, 16 Jan 2016 16:08:35 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1aKTOz-0001Br-W9 for pgsql-sql@arkaria.postgresql.org; Sat, 16 Jan 2016 16:08:34 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aKTOx-0001AF-Sm for pgsql-sql@postgresql.org; Sat, 16 Jan 2016 16:08:32 +0000 Received: from nm28.bullet.mail.bf1.yahoo.com ([98.139.212.187]) by magus.postgresql.org with esmtps (TLS1.0:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1aKTOo-00026W-KT for pgsql-sql@postgresql.org; Sat, 16 Jan 2016 16:08:30 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ymail.com; s=s2048; t=1452960499; bh=qRFbHkPgmpuP0gztqC7aj2zE0UU3OGmEUNJ5OsBIO0w=; h=Date:From:Reply-To:To:In-Reply-To:References:Subject:From:Subject; b=ALS848v3Psw70ZxqZBmd6s0I/+d/3tWc57I0drk7ph0V2C489DxuehqZ1yOx1WugNfEaHll+dmvXScrFXlpemFk5XBP6YkkVBU/bB57c1UyPnSECKOwZzNRjy0Oc73XQ/DWMjmfu2G6cKfk2OnUI6kFSNEmef9HIscYlIbcY9fDMdYbe1Zw7q0IWrlZGZNHCiPE+SQ2HhSLY3+NhP06G2YNvGCxsfiiKZPfm+G1wvJ1Mxqch414maGQJbPIXg63jzbwS5Wov86stAzXsVRU1yZACJEhNnC12E+46jmXrSVHh3+Wsl5COepTkiMpAYc25OT2783kcgIX8W/fsQo6ASw== Received: from [66.196.81.171] by nm28.bullet.mail.bf1.yahoo.com with NNFMP; 16 Jan 2016 16:08:19 -0000 Received: from [98.139.212.216] by tm17.bullet.mail.bf1.yahoo.com with NNFMP; 16 Jan 2016 16:08:19 -0000 Received: from [127.0.0.1] by omp1025.mail.bf1.yahoo.com with NNFMP; 16 Jan 2016 16:08:19 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 447952.76739.bm@omp1025.mail.bf1.yahoo.com X-YMail-OSG: jWdjoAsVM1kycC4zaOysgTxU17fygy1uj9Zs5UGUYHwI66tlwamNEoY9VeursjX iHU7hMckb57qX9csgh88WtBLoqAHRckUC4KTG.APafDhl95eN.yVbCNLK5AExinglZtSB2qJIeKL 8WYU0OMkj0d4umFoMJc9g4A9TqUElr3TIBC_RXyg0r1adC7qriHPnUJ9XS_MEuAmPpwgi_JKCQSi 06kDCsuEI8hfBbWME1uPqfh4uTCxhMT173.oAdwAGOJhmQR.EQcypXMjqSqwZ7so0YDx3N9nozM2 ittGNiLodiXddGtWe35GIQkv.FmeQYWU9TdbTt4jstzI4uM4rSRoxm6QEJ9c3t1Y6JkYNguxPzS2 _ywNq4UMliuli4L7Caraqvim8nYI8x1s8tfqhEKjVOgmpEumn4v__hxGNrh9g5d_dF0O4Tj4njLm 6wGXmDdOp2_3NPex2deTSsS4V77rQP6FGxBjwJSG8O062MiX3ubtOXdwpZOnwjKhIOu6cudJsr9L ny84Y4JSDqfScXB8hRljXZ_VPhtwp.aOaIOtdcx19CKP6j1kpi7JW8plAzSVFkSxy8A4r Received: by 76.13.27.55; Sat, 16 Jan 2016 16:08:18 +0000 Date: Sat, 16 Jan 2016 16:08:05 +0000 (UTC) From: Eugene Yin Reply-To: Eugene Yin To: John DeSoi , Postgres List Message-ID: <563742622.6654475.1452960485450.JavaMail.yahoo@mail.yahoo.com> In-Reply-To: <3E62E3B0-473E-4251-AD96-64D57E5C5186@pgedit.com> References: <3E62E3B0-473E-4251-AD96-64D57E5C5186@pgedit.com> Subject: Re: BYTEA vs BLOB MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_6654474_959617761.1452960485445" Content-Length: 4957 X-Pg-Spam-Score: -2.7 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-sql Precedence: bulk Sender: pgsql-sql-owner@postgresql.org ------=_Part_6654474_959617761.1452960485445 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable When use Ora2Pg to migrate the Oracle to Pg, the BLOB data type in Oracle w= ill supposedly be converted into BYTEA in Pg.=C2=A0 Is this achievable?=C2= =A0=C2=A0=20 If so, after the data become BYTEA, can I further convert the BYTEA into OI= D data type, and how to? Thanks=20 Eugene =20 On Thursday, January 14, 2016 8:05 AM, John DeSoi wr= ote: =20 =20 > On Jan 12, 2016, at 7:45 PM, Eugene Yin wrote: >=20 > Now if I migrate the Oracle table to Postgres and change the data type to= BYTEA, how will the photo file (BYTEA) be stored? >=20 > 1) The whole photo data will be stored inside the table? >=20 > Or >=20 > 2) Only the reference to the data is stored inside the table, the data it= self will be stored outside the table (but still within the database) for e= fficiency purpose? >=20 This is a good summary of your options: https://www.microolap.com/products/connectivity/postgresdac/help/tipsandtri= cks_byteavsoid.htm John DeSoi, Ph.D. --=20 Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql ------=_Part_6654474_959617761.1452960485445 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
When use Ora2Pg to migrate the Oracle to Pg, the BLOB data type in= Oracle will supposedly be converted into BYTEA in Pg.  Is this achiev= able?  

If so, after the data become BYTEA, can I further convert the BYTEA into = OID data type, and how to?


Thanks

<= div id=3D"yui_3_16_0_1_1452841393493_27523" dir=3D"ltr">Eugene


On Thursday, January 14, 2016 8:05 AM, John DeSoi <desoi@pgedit.com&= gt; wrote:



> On Jan 12,= 2016, at 7:45 PM, Eugene Yin <eugeneymail@ymail.c= om> wrote:
>
> Now if I m= igrate the Oracle table to Postgres and change the data type to BYTEA, how = will the photo file (BYTEA) be stored?
>
> 1) The whole photo data will be stored inside the table?
>
> Or
>
> 2) Only the reference to the data is stored inside the table= , the data itself will be stored outside the table (but still within the da= tabase) for efficiency purpose?

>

This is a good summary of your options:

https://www.microolap.com/products/connectivity/postgresdac/= help/tipsandtricks_byteavsoid.htm

= John DeSoi, Ph.D.


<= br clear=3D"none">--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
T= o make changes to your subscription:
http:= //www.postgresql.org/mailpref/pgsql-sql

<= /div>
------=_Part_6654474_959617761.1452960485445--