Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1aInt3-000659-4d for pgsql-sql@arkaria.postgresql.org; Tue, 12 Jan 2016 01:36:41 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1aInt2-0004KY-NS for pgsql-sql@arkaria.postgresql.org; Tue, 12 Jan 2016 01:36:40 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aIns0-0002Rn-G1 for pgsql-sql@postgresql.org; Tue, 12 Jan 2016 01:35:36 +0000 Received: from nm42-vm6.bullet.mail.ne1.yahoo.com ([98.138.121.62]) by makus.postgresql.org with esmtps (TLS1.0:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1aInrx-0001d2-A5 for pgsql-sql@postgresql.org; Tue, 12 Jan 2016 01:35:35 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ymail.com; s=s2048; t=1452562531; bh=p5fYma+bCSwjrjasnCAvUTAPvTBKkuPB2LCwysIARyQ=; h=Date:From:Reply-To:To:Cc:In-Reply-To:References:Subject:From:Subject; b=ELEB0jH8gOIIhL+912YdSTWoEmo9AA8CR0j98GsAJAOUqhCoWvGk8exIKksGMnSZyP1NNAEZ5Jj480vD0V3VEsFslqwnqwvySdd4lTpAKEVez3OahsVw4dCIpUACXwex2IjHs4QLVFfZnAMvumlqnYPLkLD1XFYZRF4pU+uWjXKIMWocwk3fLxKBWtc9HbEwR4VL7Tj3B/h/jehkE8LP4qq+rZZ40xKV0JktQfIpQ3O31uOjsrmqLdEeaSl2miBjv35hI+BSUPukAnt08ztioIIGj/ctB/EzRaJ4XI9sdVUpHsWIhY7RwLzEjv8PsjvkYQoz2OzM179gaSB6lZb8Zw== Received: from [127.0.0.1] by nm42.bullet.mail.ne1.yahoo.com with NNFMP; 12 Jan 2016 01:35:31 -0000 Received: from [98.138.226.180] by nm42.bullet.mail.ne1.yahoo.com with NNFMP; 12 Jan 2016 01:32:51 -0000 Received: from [98.139.170.180] by tm15.bullet.mail.ne1.yahoo.com with NNFMP; 12 Jan 2016 01:32:50 -0000 Received: from [98.139.212.242] by tm23.bullet.mail.bf1.yahoo.com with NNFMP; 12 Jan 2016 01:32:50 -0000 Received: from [127.0.0.1] by omp1051.mail.bf1.yahoo.com with NNFMP; 12 Jan 2016 01:32:50 -0000 X-Yahoo-Newman-Property: ymail-4 X-Yahoo-Newman-Id: 549056.31120.bm@omp1051.mail.bf1.yahoo.com X-YMail-OSG: FVzpwWkVM1n7Ky6USYaO2fIq3rNXzbr4HbY51JaSL4pdXoGHaE0jIsyM5QUtuSR 5k29s2ikL.RCKK.oDas_cixvMJrPzAJmbGW8HCQumPhPVKYMFsOEC1YIOdDCshzieCGfwBPwPv0T bpHufIq89pfRZ_Or45NkGDr62m2I.7PBXvt_UZxquDGEkrGhUrRpcJZe8NwhLFh0XJ5U5sauQ.wI s5Ar_fM9TXjDUN2ZQT0rl.XQskpFKwq5pQxcPZB7qtNaHs6uVaXHg0s0Bx0ojk_4Y9P5k4_y1VQ6 VD2RdLx8SMzQPmI5CpMCTn_mnNavEyxXmTcz7DBjVhzC6Fdn14Vg480IUuw1.etDkWUWBPfOer1S 64ZA0YIv5SHAd7kQ38HWjbPK7vMo31h2QlXwqc3eS6TF8T2XQk4O6qYrxuhy0eBUbMWWoKPcxuMs idq5DxAo1sL5b15Mq3qZNADk_SPcfWPip_Dm1D.hRnx2bpLrtLoY61wzpFiQXzHNiHDlBKBpWEjq L4G4lcPUJ1GdF6pLc23YAOxIH1xaLnGDi4v1U4WOYW.bSjYmUy9aWvBNLdoBMOKEq4wN_X9BrA81 at8qa Received: by 66.196.81.107; Tue, 12 Jan 2016 01:32:47 +0000 Date: Tue, 12 Jan 2016 01:32:46 +0000 (UTC) From: Eugene Yin Reply-To: Eugene Yin To: Andreas Joseph Krogh Cc: "pgsql-sql@postgresql.org" Message-ID: <653214003.3602816.1452562366970.JavaMail.yahoo@mail.yahoo.com> In-Reply-To: References: Subject: Re: BLOBs MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_3602815_520342918.1452562366969" Content-Length: 40253 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_3602815_520342918.1452562366969 Content-Type: multipart/alternative; boundary="----=_Part_3602814_1058973291.1452562366948" ------=_Part_3602814_1058973291.1452562366948 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable I did some search on the OID data type. =C2=A0Here is something I found reg= arding to the deletion of the OID data. QUOTE: "The Large Object method for storing binary data is better suited to storin= g very large values, but it has its own limitations. Specifically deleting = a row that contains a Large Object reference does not delete the Large Obje= ct.=C2=A0 Deleting the Large Object is a separate operation that needs to be performe= d.=C2=A0 Large Objects also have some security issues since anyone connected to the = database can view and/or modify any Large Object, even if they don't have p= ermissions to view/update the row containing the Large Object reference." From:=C2=A0https://jdbc.postgresql.org/documentation/84/binary-data.html So I have two questions: 1) =C2=A0If it is true that "Deleting the Large Object is a separate operat= ion that needs to be performed.", after the deletion, what operation I need= to perform, in order to delete the OID data in the table? =C2=A0Possiblely= put into an after trigger 2) "Large Objects also have some security issues since anyone connected to = the database can view and/or modify any Large Object". =C2=A0Will this pose= a real risk to the security? =C2=A0or just a forethought? =20 On Monday, January 11, 2016 9:49 AM, Andreas Joseph Krogh wrote: =20 P=C3=A5 mandag 11. januar 2016 kl. 16:37:50, skrev Eugene Yin : =C2=A0QUOTE:=C2=A0Maven-config: 0.6 com.impossibl.pgjdbc-ng pgjdbc-ng ${version.pgjdbc-ng} complete =C2=A0=C2=A0I do not use Maven. =C2=A0=C2=A0I use web.xml and standalone-ha= .xml of JBoss AS 7.1.1 to configure the JDBC, such as=C2=A0=C2=A0[web.xml]= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Resource referenc= e to my database=C2=A0 =C2=A0=C2=A0jdbc/web=C2=A0 =C2=A0=C2=A0javax.sql.DataSource=C2= =A0 =C2=A0=C2=A0Application =C2=A0 =C2=A0=C2=A0Shareable=C2=A0=C2=A0=C2=A0= =C2=A0 =C2=A0[standalone-ha.xml]=C2=A0=C2=A0=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 jdbc:oracle:thin:@192.168.1.20:1521:deepy=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 oracle.jdbc.OracleDriver=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 OracleJDBCDriver=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 <= security>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 mysecuritydomain=C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 false=C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 false=C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 <= share-prepared-statements>false=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=C2=A0= =C2=A0What corresponding changes I need to make to use the Postgres? =C2=A0Using Maven is only for getting the right deps in place for your app,= it has nothing to do with configuration.=C2=A0The URL should be on the for= m:jdbc:pgsql://:/?blob.type=3DoidOther parameter= s are available here: http://impossibl.github.io/pgjdbc-ng/=C2=A0--Andreas = Joseph KroghCTO / Partner - Visena ASMobile: +47 909 56 963andreas@visena.c= omwww.visena.com=C2=A0 =20=20= ------=_Part_3602814_1058973291.1452562366948 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
I did some search on the OI= D data type.  Here is something I found regarding to the deletion of t= he OID data.

QUOTE:

"The Large Object method for storing binar= y data is better suited to storing very large values, but it has its own li= mitations. Specifically deleting a row that contains a Large Object referen= ce does not delete the Large Object. 

Deleting the Large Object is = a separate operation that needs to be performed. 

Large Objects als= o have some security issues since anyone connected to the database can view= and/or modify any Large Object, even if they don't have permissions to vie= w/update the row containing the Large Object reference."



So I have tw= o questions:

1)  If it is true that "Deleting the Large Object is a= separate operation that needs to be performed.", after the deletion, what = operation I need to perform, in order to delete the OID data in the table? =  Possiblely put into an after trigger

2) "Large Objects also have s= ome security issues since anyone connected to the database can view and/or = modify any Large Object".  Will this pose a real risk to the security?=  or just a forethought?






=
On Mon= day, January 11, 2016 9:49 AM, Andreas Joseph Krogh <andreas@visena.com&= gt; wrote:


P=C3=A5 mandag 11. januar 2016 kl. 16:37:50, = skrev Eugene Yin <eugeneymail@ymail.com>:
 
QUOTE:
 
Maven-conf= ig:
<properties>
    <version.pgjdbc-ng>0.6=
</version.pgjdbc-ng>
</properties>
<de=
pendency>
    <groupId>com.impossibl=
.pgjdbc-ng</groupId>
    <artifactId>pgjdbc-ng&=
lt;/artifactId>
    <version>${version.pgj=
dbc-ng}</version>
    <classifier>complete&l=
t;/classifier>
</dependency>
&nbs= p;
&nbs= p;
I do not use Maven.  
&nbs= p;
I use web.x= ml and standalone-ha.xml of JBoss AS 7.1.1 to configure the JDBC= , such as
&nbs= p;
&nbs= p;
[w= eb.xml]
 
&l= t;resource-ref>
     <description<= font id=3D"yiv3540064857yui_3_16_0_1_1452227859253_177771" size=3D"2">><= /font>Resource reference to my database</description= >=
    <res-ref-name<= font id=3D"yiv3540064857yui_3_16_0_1_1452227859253_177817" color=3D"#008080= ">>jdbc/<= font id=3D"yiv3540064857yui_3_16_0_1_1452227859253_177841" size=3D"2">web</res-ref-name&g= t;
    <= font id=3D"yiv3540064857yui_3_16_0_1_1452227859253_177873" face=3D"Monospac= e">&= lt;res-type>javax.sql.DataSource</res-type>
    <= font id=3D"yiv3540064857yui_3_16_0_1_1452227859253_177923" face=3D"Monospac= e">&= lt;res-auth>Application</<= font id=3D"yiv3540064857yui_3_16_0_1_1452227859253_177951" color=3D"#3f7f7f= ">res-auth>
    <= font id=3D"yiv3540064857yui_3_16_0_1_1452227859253_177979" face=3D"Monospac= e">&= lt;res-sharing-scope<= font id=3D"yiv3540064857yui_3_16_0_1_1452227859253_177993" size=3D"2">><= /font>Shareable</= res-sharing-scope>
<= font id=3D"yiv3540064857yui_3_16_0_1_1452227859253_178021" face=3D"Monospac= e">&= nbsp;</resource-ref>
&nbs= p;
    
[standalone-ha.xml]
&nbs= p;
 <datasource jta=3D"false" jndi-name=3D"java:/jdbc/web" pool-name=3D"OracleDS"= enabled=3D"true" use-ccm=3D"false">
                   = ; <connection-url>jdbc:oracle:thin:@192.168.1.20:1521:deepy</conne= ction-url>
                   = ; <driver-class>oracle.jdbc.OracleDriver</driver-class><= /div>
                   = ; <driver>OracleJDBCDriver</driver>
                   = ; <security>
                   = ;     <security-domain>mysecuritydomain</security-domain= >
                   = ; </security>
                   = ; <validation>
                   = ;     <validate-on-match>false</validate-on-match>
                   = ;     <background-validation>false</background-validatio= n>
                   = ; </validation>
                   = ; <statement>
                   = ;     <share-prepared-statements>false</share-prepared-s= tatements>
                   = ; </statement>
                </datasou= rce>
&nbs= p;
&nbs= p;
&nbs= p;
What corresponding changes I need to make to use the Postgres?
 
Using Maven is only for getting the right deps in place for your app, = it has nothing to do with configuration.
 
The URL should be on the form:
jdbc:pgsql://<host>:<port&g=
t;/<database_name>?blob.type=3Doid
Other parameters are available here: http://impossibl.github.io/pgjdbc= -ng/
 
--
Andr= eas Joseph Krogh
CTO / Partne= r - Visena AS
Mobile: +47 = 909 56 963
3D""
 


= ------=_Part_3602814_1058973291.1452562366948-- ------=_Part_3602815_520342918.1452562366969 Content-Type: image/png Content-Transfer-Encoding: base64 Content-Disposition: inline Content-ID: iVBORw0KGgoAAAANSUhEUgAAAIUAAAAYCAYAAADUIj6hAAAABHNCSVQICAgI fAhkiAAABzBJREFUaEPtmNFxHDcMhmVP3i1VECpvnjzkVIHWFfhcgVcVRKrA UgWRK/C6Al8H3lTgy0PGbzFdQc4VJP/HADs43q6kROeJNbOYgQACIAgCWJKn g4MZ5gxUGXh0U0b+SIuF9G+EWXj2Q15vbrE/NPtk9uub7Gfdt5mBx1NhqSEo 8HshjbEUtlO2yIM9tsx5dZP9rPt2MzDZFAqZE4LGcFjdsg3saQaHt7fY70X9 49OnaS+OZidDBkavD33157L4xaw2os+Mp/DAC10l2XhOCeStj0W5ajrJL8Wf Ci80Xgf9vVlrhg9yRONe/f7xI2vNsIcM7JwU9o6oGyJrLT8JOA1aX9sKP4wl 94bAniukEbo/n7YPmuTETzIab4Y9ZWCrKexd8M58lx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position: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql ------=_Part_3602815_520342918.1452562366969--