Re: [GENERAL] JDBC: logical replication and LSN feedback

2017-09-20 Thread Yason TR
gsql-general@postgresql.org" , List Subject: Re: [GENERAL] JDBC: logical replication and LSN feedback +list   First off you are going to get considerably better response from the JDBC list or our github project.   Looking at the code; in order to ensure the backend has recei

Re: [GENERAL] JDBC: logical replication and LSN feedback

2017-09-20 Thread Dave Cramer
sure. > > Thanks a lot and kind regards, > > Yason TR > > *Sent:* Tuesday, September 19, 2017 at 4:14 PM > *From:* "Achilleas Mantzios" > *To:* pgsql-general@postgresql.org > *Subject:* Re: [GENERAL] JDBC: logical replication and LSN feedback > On 19/09/2017

Re: [GENERAL] JDBC: logical replication and LSN feedback

2017-09-19 Thread Yason TR
illeas Mantzios" To: pgsql-general@postgresql.org Subject: Re: [GENERAL] JDBC: logical replication and LSN feedback On 19/09/2017 16:37, Yason TR wrote: > Hi all, > > I am developing an application which connects to a logical replication slot, to consume the WAL events. These WAL events

Re: [GENERAL] JDBC: logical replication and LSN feedback

2017-09-19 Thread Achilleas Mantzios
On 19/09/2017 16:37, Yason TR wrote: Hi all, I am developing an application which connects to a logical replication slot, to consume the WAL events. These WAL events are then forwarded to a MQ broker. The heart of the code can be seen as: while (true) { Connection connection = null;

Re: [GENERAL] jdbc driver vis Release 10

2017-08-28 Thread Dave Cramer
Well we won't be fixing any bugs in anything but the latest version if that makes a difference to you. Dave Cramer da...@postgresintl.com www.postgresintl.com On 25 August 2017 at 21:34, Rob Sargent wrote: > > > On Aug 25, 2017, at 5:55 PM, Dave Cramer wrote: > > There are newer versions out

Re: [GENERAL] jdbc driver vis Release 10

2017-08-25 Thread Rob Sargent
> On Aug 25, 2017, at 5:55 PM, Dave Cramer wrote: > > There are newer versions out there! > > Dave Cramer > > da...@postgresintl.com > www.postgresintl.com > >> On 25 August 2017 at 19:53, Rob Sargent wrote: >> >> >>> On 08/25/2017 05:34 PM, Dave Cramer wrote: >>> The JDBC driver release

Re: [GENERAL] jdbc driver vis Release 10

2017-08-25 Thread Dave Cramer
There are newer versions out there! Dave Cramer da...@postgresintl.com www.postgresintl.com On 25 August 2017 at 19:53, Rob Sargent wrote: > > > On 08/25/2017 05:34 PM, Dave Cramer wrote: > > The JDBC driver release is divorced from the server release. > > Thanks > > Dave Cramer > > da...@post

Re: [GENERAL] jdbc driver vis Release 10

2017-08-25 Thread Rob Sargent
On 08/25/2017 05:34 PM, Dave Cramer wrote: The JDBC driver release is divorced from the server release. Thanks Dave Cramer da...@postgresintl.com www.postgresintl.com On 23 August 2017 at 19:33, Rob Sargent

Re: [GENERAL] jdbc driver vis Release 10

2017-08-25 Thread Dave Cramer
The JDBC driver release is divorced from the server release. Thanks Dave Cramer da...@postgresintl.com www.postgresintl.com On 23 August 2017 at 19:33, Rob Sargent wrote: > I see no mention of a new jdbc driver on the release notes for Beta 1. > Does that mean there isn't one? > > > > > -- >

Re: [GENERAL] jdbc driver vis Release 10

2017-08-23 Thread Rob Sargent
On 08/23/2017 06:09 PM, David G. Johnston wrote: On Wed, Aug 23, 2017 at 4:33 PM, Rob Sargent >wrote: I see no mention of a new jdbc driver on the release notes for Beta 1. Does that mean there isn't one? ​Whose release notes? PostgreSQL Server? I don

Re: [GENERAL] jdbc driver vis Release 10

2017-08-23 Thread David G. Johnston
On Wed, Aug 23, 2017 at 4:33 PM, Rob Sargent wrote: > I see no mention of a new jdbc driver on the release notes for Beta 1. > Does that mean there isn't one? ​Whose release notes? PostgreSQL Server? I don't believe the server release notes ever talk about external projects.​ Its seems quite

Re: [GENERAL] jdbc 9.4-1208 driver for PostgreSQL 9.5?

2016-07-13 Thread Albe Laurenz
Joek Hondius wrote: > (I hope i am on the right list) pgsql-jdbc would have been the perfect list. > jdbc.postgresql.org lists version 9.4 build 1208 as the lastest. > Is this the correct version to use with PostgreSQL 9.5 (or even 9.6-beta)? > I cannot find info on this elsewhere. Yes, you shou

Re: [GENERAL] [JDBC] JDBC behaviour

2016-02-20 Thread Craig Ringer
On 18 February 2016 at 16:13, Vladimir Sitnikov wrote: If you want to shoot yourself in a foot for fun and profit, you can > try https://github.com/pgjdbc/pgjdbc/pull/477. > I think this should be incorporated, once it's ready, as a non-default connection option. It's handy for porting applicati

Re: [GENERAL] [JDBC] JDBC behaviour

2016-02-18 Thread John R Pierce
On 2/18/2016 12:26 AM, Sridhar N Bamandlapally wrote: If we want transactions in "begin-end" then its fine, but in this case all these transactions are independent with autocommit off, with autocommit OFF, when you issue the first query, jdbc generates a postgresql BEGIN; this starts a post

Re: [GENERAL] [JDBC] JDBC behaviour

2016-02-18 Thread Sridhar N Bamandlapally
Ok, let me put this way in JDBC we have *setAutoCommit( false ) *, and all dmls are independent transactions and when any transaction fails then the session not allowing next transactions in Java when we do setAutoCommit( false ) its behaving like all transactions in BEGIN-END block, this is not

Re: [GENERAL] [JDBC] JDBC behaviour

2016-02-18 Thread Vladimir Sitnikov
> but in this case all these transactions are independent with autocommit off, At database level, there is no "autocommit=off". There's just "begin-end". It is database who forbids .commit, not the JDBC driver. Vladimir -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To m

Re: [GENERAL] [JDBC] JDBC behaviour

2016-02-18 Thread Sridhar N Bamandlapally
If we want transactions in "begin-end" then its fine, but in this case all these transactions are independent with autocommit off, user choice to continue with commit or rollback Thanks Sridhar On Thu, Feb 18, 2016 at 1:43 PM, Vladimir Sitnikov < sitnikov.vladi...@gmail.com> wrote: > >Is it

Re: [GENERAL] [JDBC] JDBC behaviour

2016-02-18 Thread Vladimir Sitnikov
>Is it a bug or do we have other any alternate way to handle this ? PostgreSQL is strongly against "partial commits to the database". If you think a bit about it, it is not that bad. You got an error, what is the business case to commit the partial transaction then? Exceptions should not be used

Re: [GENERAL] JDBC behaviour

2016-02-18 Thread Sridhar N Bamandlapally
Hi We are facing issue with PostgreSQL JDBC behaviour in Java, under autocommit false mode, 1. In between if any transaction then for next transaction, throws exception saying "current transaction is aborted, commands ignored until end of transaction block" 2. Even if exception is suppressed wi

Re: [GENERAL] [JDBC] plpgsql function with RETURNS SETOF refcursor in JAVA

2015-12-14 Thread Corradini, Carlos
; pgsql-general@postgresql.org; Kris Jurka Asunto: Re: [GENERAL] [JDBC] plpgsql function with RETURNS SETOF refcursor in JAVA >As I understand, it's all what you need, isn't you Ideally I would like to see a pull request at https://github.com/pgjdbc/pgjdbc/pulls, however your cod

Re: [GENERAL] [JDBC] plpgsql function with RETURNS SETOF refcursor in JAVA

2015-12-14 Thread Corradini, Carlos
drian Klaver; pgsql-j...@postgresql.org; pgsql-general@postgresql.org; Kris Jurka Asunto: Re: [GENERAL] [JDBC] plpgsql function with RETURNS SETOF refcursor in JAVA On Fri, Dec 11, 2015 at 2:11 PM, Corradini, Carlos wrote: > with your and Mr. Kevin explanations, the Java program have worked &g

Re: [GENERAL] [JDBC] plpgsql function with RETURNS SETOF refcursor in JAVA

2015-12-14 Thread Corradini, Carlos
n Klaver; pgsql-j...@postgresql.org; pgsql-general@postgresql.org; Kris Jurka Asunto: Re: [GENERAL] [JDBC] plpgsql function with RETURNS SETOF refcursor in JAVA On Fri, Dec 11, 2015 at 2:11 PM, Corradini, Carlos wrote: > with your and Mr. Kevin explanations, the Java program have worke

Re: [GENERAL] [JDBC] plpgsql function with RETURNS SETOF refcursor in JAVA

2015-12-14 Thread Corradini, Carlos
date) TO ro_dw_bsc_sys_adm; One more thing, I am a DBA ORACLE and not a Developer, please, excuse me if I made "horrors" in the programming, I promise to be more effective next time ! As I understand, it's all what you need, isn't you -Mensaje original- De: V

Re: [GENERAL] [JDBC] plpgsql function with RETURNS SETOF refcursor in JAVA

2015-12-14 Thread Corradini, Carlos
diciembre de 2015 12:27 p.m. Para: Corradini, Carlos; pgsql-j...@postgresql.org; pgsql-general@postgresql.org CC: bo...@ejurka.com Asunto: Re: [GENERAL] [JDBC] plpgsql function with RETURNS SETOF refcursor in JAVA On 12/11/2015 07:10 AM, Corradini, Carlos wrote: > Mr. Adrian, first let me say m

Re: [GENERAL] [JDBC] plpgsql function with RETURNS SETOF refcursor in JAVA

2015-12-14 Thread Vladimir Sitnikov
>Ok. I understand, to put there a pull request, I must to register into this >webpage ?? Exactly. Vladimir -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] [JDBC] plpgsql function with RETURNS SETOF refcursor in JAVA

2015-12-14 Thread Vladimir Sitnikov
>As I understand, it's all what you need, isn't you Ideally I would like to see a pull request at https://github.com/pgjdbc/pgjdbc/pulls, however your code seems to be good enough so somebody else can pick it up, simplify a bit, and file a PR. Vladimir -- Sent via pgsql-general mailing lis

Re: [GENERAL] [JDBC] plpgsql function with RETURNS SETOF refcursor in JAVA

2015-12-14 Thread Vladimir Sitnikov
> I hope I have been the most clear as my poor level of English could be.. It would be great if you could express that in java + sql as well, so the exact code can be added to JDBC driver test suite as a regression test. Vladimir -- Sent via pgsql-general mailing list (pgsql-general@postgresql.

Re: [GENERAL] [JDBC] plpgsql function with RETURNS SETOF refcursor in JAVA

2015-12-11 Thread Kevin Grittner
On Fri, Dec 11, 2015 at 2:11 PM, Corradini, Carlos wrote: > with your and Mr. Kevin explanations, the Java > program have worked fine and have printed the data obtained from a two > cursors inside a PostgreSQL Database Stored Function. > > Then, I can confirm that this version of DB ( 9.4 ) use t

Re: [GENERAL] [JDBC] plpgsql function with RETURNS SETOF refcursor in JAVA

2015-12-11 Thread Corradini, Carlos
a.m. Para: Corradini, Carlos; pgsql-j...@postgresql.org; pgsql-general@postgresql.org CC: bo...@ejurka.com Asunto: Re: [GENERAL] [JDBC] plpgsql function with RETURNS SETOF refcursor in JAVA On 12/11/2015 04:56 AM, Corradini, Carlos wrote: > Mr. Adrian, here i transcribe the code of the function

Re: [GENERAL] [JDBC] plpgsql function with RETURNS SETOF refcursor in JAVA

2015-12-11 Thread Corradini, Carlos
; select * from dw_bsc.proc_perspectives('R', 1, null, null, null, null, null); fetch all from ""; end; inside the query gui tool provided by pgAdmin III The connection into the java application was changed to con.setAutoCommit(false); I think I do not forget nothing else Some h

Re: [GENERAL] [JDBC] plpgsql function with RETURNS SETOF refcursor in JAVA

2015-12-11 Thread Adrian Klaver
any thanks -Mensaje original- De: Adrian Klaver [mailto:adrian.kla...@aklaver.com] Enviado el: viernes, 11 de diciembre de 2015 11:37 a.m. Para: Corradini, Carlos; pgsql-j...@postgresql.org; pgsql-general@postgresql.org CC: bo...@ejurka.com Asunto: Re: [GENERAL] [JDBC] plpgsql function with RET

Re: [GENERAL] [JDBC] plpgsql function with RETURNS SETOF refcursor in JAVA

2015-12-11 Thread Adrian Klaver
Some help will be appreciated very, very, very much ! -Mensaje original- De: Adrian Klaver [mailto:adrian.kla...@aklaver.com] Enviado el: jueves, 10 de diciembre de 2015 06:25 p.m. Para: Corradini, Carlos; pgsql-j...@postgresql.org; pgsql-general@postgresql.org CC: bo...@ejurka.com Asunt

Re: [GENERAL] [JDBC] plpgsql function with RETURNS SETOF refcursor in JAVA

2015-12-10 Thread Kevin Grittner
On Thu, Dec 10, 2015 at 7:38 AM, Corradini, Carlos wrote: > I have a Java application that must read a > data provided by two ( 2 ) cursors returned by a function stored in a > database. I know to retrieve data if the function have one ( 1 ) cursor, but > with two I can’t. I will very pleased if

Re: [GENERAL] [JDBC] plpgsql function with RETURNS SETOF refcursor in JAVA

2015-12-10 Thread Adrian Klaver
On 12/10/2015 05:38 AM, Corradini, Carlos wrote: Dear Gurus : First let me say hello from Buenos Aires, Argentina. I took this emails addresses from internet ( page www.postgresql.org ) Now I will try to explain which is my problem (

Re: [GENERAL] JDBC and inet type

2015-12-07 Thread Tim Smith
Great, thanks! On 4 December 2015 at 12:17, Bill Moran wrote: > On Fri, 4 Dec 2015 09:41:24 + > Tim Smith wrote: > >> When I use "preparedStatement.setString(5,ip);" to send values to a >> stored function, it obviously gets sent to postgres as "character >> varying". >> >> Postgres obviously

Re: [GENERAL] JDBC and inet type

2015-12-04 Thread Bill Moran
On Fri, 4 Dec 2015 09:41:24 + Tim Smith wrote: > When I use "preparedStatement.setString(5,ip);" to send values to a > stored function, it obviously gets sent to postgres as "character > varying". > > Postgres obviously complains loudly and says " Hint: No function > matches the given name a

Re: [GENERAL] JDBC and inet type

2015-12-04 Thread rob stone
On Fri, 2015-12-04 at 09:41 +, Tim Smith wrote: > Hi, > > When I use "preparedStatement.setString(5,ip);" to send values to a > stored function, it obviously gets sent to postgres as "character > varying". > > Postgres obviously complains loudly and says " Hint: No function > matches the give

Re: [GENERAL] [JDBC] Upgrading from PG 8.3.3 to 9.3.4 - FATAL: invalid value for parameter "TimeZone": "PST"

2014-06-01 Thread Tom Lane
David Wall writes: > The exception occurs when JDBC tries to connect to PG: > 2014-05-31 22:14:34,351 ERROR (eSignForms) SQLException: > ConnectionPool.makeConnection(esf) to URL: > jdbc:postgresql://localhost.localdomain:25432/zingr: > 2014-05-31 22:14:34,352 ERROR (eSignForms) Message: FA

Re: [GENERAL] [JDBC] Cannot insert to 'path' field using EclipseLink

2014-03-12 Thread Steven Schlansker
> On Mar 12, 2014, at 10:12 AM, Daryl Foster wrote: > > java.lang.ClassCastException: org.postgresql.geometric.PGpath cannot be cast > to org.postgresql.geometric.PGpath > That's a sure sign of ClassLoader confusion. Make sure there is only one copy of the driver jar in your application or

Re: [GENERAL] JDBC performance issue

2014-02-05 Thread Dave Cramer
You said they upgraded the driver but the versions you stated are the same ??? Dave Cramer dave.cramer(at)credativ(dot)ca http://www.credativ.ca On Wed, Feb 5, 2014 at 12:23 PM, CS DBA wrote: > Hi All; > > We have a client running Pentaho to migrate data. > > They recently upgraded Pentaho wh

Re: [GENERAL] JDBC performance issue

2014-02-05 Thread David Johnston
CS DBA wrote > Hi All; > > We have a client running Pentaho to migrate data. > > They recently upgraded Pentaho which upgraded their JDBC driver from 8.4 > (postgresql-8.4-703.jdbc4.jar) to 9.1 (postgresql-8.4-703.jdbc4.jar). > They have a test set which updates 1000 rows, with the old driver

Re: [GENERAL] JDBC driver for Postgres 9.3

2013-09-26 Thread Steven Schlansker
On Sep 26, 2013, at 6:35 AM, "Kohler Manuel" wrote: > Hi, > we are developing a Java based software with Postgres as a DB. > Could someone tell me if there will be a JDBC driver for 9.3 out soon or > is it safe and recommended to use the latest JDBC driver available? > Currently we are using: >

Re: [GENERAL] JDBC prepared statement is not treated as prepared statement

2013-06-18 Thread 高健
Hello : >Server prepared statements are kept in the private memory of the >PostgreSQL backend process. If you need a statement only once or >twice, it would be wasteful to keep it around. >The idea is that it is worth the effort only if the statement is executed >more than a couple of times.

Re: [GENERAL] JDBC prepared statement is not treated as prepared statement

2013-06-18 Thread Albe Laurenz
高健 wrote: > I change my Java program by adding the following: > > org.postgresql.PGStatement pgt = (org.postgresql.PGStatement)pst; > pgt.setPrepareThreshold(1); > > I can see an entry is in pg_prepared_statements now. Good. > But the hyperlink's documentation made me a little confused. I also

Re: [GENERAL] JDBC prepared statement is not treated as prepared statement

2013-06-17 Thread 高健
Hello: Thanks to Laurenz. Your information is very helpful for me. I change my Java program by adding the following: org.postgresql.PGStatement pgt = (org.postgresql.PGStatement)pst; pgt.setPrepareThreshold(1); I can see an entry is in pg_prepared_statements now. But the hyperlink's docu

Re: [GENERAL] JDBC prepared statement is not treated as prepared statement

2013-06-17 Thread Albe Laurenz
高健 wrote: > I have one question about prepared statement. > I use Java via JDBC, then send prepared statement to execute. > I thought that the pg_prepared_statments view will have one record after my > execution. > But I can't find. > > Is the JDBC's prepared statement differ from SQL execut

Re: [GENERAL] JDBC driver versions

2013-04-16 Thread Adrian Klaver
On 04/16/2013 01:54 PM, Ramsey Gurley wrote: Okay, I saw that, but I just wanted to double check. It seemed odd that there were builds going all the way back to 8.2 if the 9.2 version should work for everything. It works for Postgres going back to 7.2, but not for older JDK and JDBC versions

Re: [GENERAL] JDBC driver versions

2013-04-16 Thread Ramsey Gurley
Okay, I saw that, but I just wanted to double check. It seemed odd that there were builds going all the way back to 8.2 if the 9.2 version should work for everything. Thanks for the reassurance :-) Ramsey On Apr 16, 2013, at 1:36 PM, Adrian Klaver wrote: > On 04/16/2013 01:13 PM, Ramsey Gurle

Re: [GENERAL] JDBC driver versions

2013-04-16 Thread Adrian Klaver
On 04/16/2013 01:13 PM, Ramsey Gurley wrote: Hi all, I'm migrating from postgres 8.3 to 9.2. Included in my application is an old jar for the JDBC driver for the 8.3 database. Do I need a separate build with an up to date JDBC jar for 9.2 while I am testing out a new database or is it safe to

Re: [GENERAL] JDBC driver versions

2013-04-16 Thread John R Pierce
On 4/16/2013 1:13 PM, Ramsey Gurley wrote: I'm migrating from postgres 8.3 to 9.2. Included in my application is an old jar for the JDBC driver for the 8.3 database. Do I need a separate build with an up to date JDBC jar for 9.2 while I am testing out a new database or is it safe to use the la

Re: [GENERAL] JDBC not returning update count from updateable view

2013-02-26 Thread Dean Rasheed
On 25 February 2013 19:52, Russell Keane wrote: > Hi, > > > > We have a table which is inserted to and update via a view (using rules / > functions). > In PG 9.1 and later, the recommended way to do this is using INSTEAD OF triggers on the view. See the "Notes" section here: http://www.postgresq

Re: [GENERAL] JDBC not returning update count from updateable view

2013-02-26 Thread Russell Keane
But this works just fine when using libpq via c++. From: davecra...@gmail.com [mailto:davecra...@gmail.com] On Behalf Of Dave Cramer Sent: 26 February 2013 12:23 To: Russell Keane Cc: pgsql-general@postgresql.org Subject: Re: [GENERAL] JDBC not returning update count from updateable view As

Re: [GENERAL] JDBC not returning update count from updateable view

2013-02-26 Thread Dave Cramer
As far as I remember this is an artifact of using rules to update a table. Dave Cramer dave.cramer(at)credativ(dot)ca http://www.credativ.ca On Mon, Feb 25, 2013 at 2:52 PM, Russell Keane wrote: > Hi, > > ** ** > > We have a table which is inserted to and update via a view (using rules /

Re: [GENERAL] [JDBC] can't access through SSL

2013-02-24 Thread Michael Paquier
On Mon, Feb 25, 2013 at 10:07 AM, Adrian Klaver wrote: > 1) Postgres-XC != Postgres. It shares a code base but adds more moving > parts. Along that line, you will need to be more specific about how you > have setup Postgres-XC and exactly which part is failing? I for one do not > use it, so I am n

Re: [GENERAL] [JDBC] can't access through SSL

2013-02-24 Thread Adrian Klaver
On 02/24/2013 05:54 PM, Maz Mohammadi wrote: Hi Adrian, Thanks for sharing some pointers with me. You are right, it's not actually an JDBC driver issue. I posted it on jdbc, because I'm accessing it from a jdbc client, I thought there might be some security issues with the JDBC driver. 1) I

Re: [GENERAL] [JDBC] can't access through SSL

2013-02-24 Thread Maz Mohammadi
ssl.trustStorePassword=password I'll post this on the other distribution list. BTW, I don't see much in the log files under /var/log directory. -maz -Original Message- From: Adrian Klaver [mailto:adrian.kla...@gmail.com] Sent: Sunday, February 24, 2013 8:08 PM To: Maz Moha

Re: [GENERAL] [JDBC] can't access through SSL

2013-02-24 Thread Adrian Klaver
On 02/24/2013 02:35 PM, Maz Mohammadi wrote: Correct! I'm new postgresql and I need to figure this out for a client. I installed a bunch packages on my Ubuntu linux and here I am. I've learned a lot. I have 2 datanodes, coordinator + gtm. Some general pointers on helping to figure this ou

Re: [GENERAL] [JDBC] can't access through SSL

2013-02-24 Thread Maz Mohammadi
com] Sent: Sunday, February 24, 2013 4:37 PM To: Maz Mohammadi Cc: pgsql-j...@postgresql.org; pgsql-general@postgresql.org Subject: Re: [GENERAL] [JDBC] can't access through SSL On 02/23/2013 08:05 PM, Maz Mohammadi wrote: > I still can't access my SSL enabled server!!! > > Is roo

Re: [GENERAL] [JDBC] can't access through SSL

2013-02-24 Thread Adrian Klaver
On 02/23/2013 08:05 PM, Maz Mohammadi wrote: I still can’t access my SSL enabled server!!! Is root.crt supposed to be an exact copy of server.crt file which I use in my client’s keystore? I have another observation. As I start the coordinator node, I don’t see any file access to the server.key

Re: [GENERAL] [JDBC] can't access through SSL

2013-02-24 Thread Ray Stell
On Feb 23, 2013, at 11:05 PM, Maz Mohammadi wrote: > > FATAL: connection requires a valid client certificate. I use openssl to verify the chain, I think that would help you know what's going on: openssl verify -CAfile rootca.crt user.crt

Re: [GENERAL] [JDBC] can't access through SSL

2013-02-23 Thread Maz Mohammadi
I still can't access my SSL enabled server!!! Is root.crt supposed to be an exact copy of server.crt file which I use in my client's keystore? I have another observation. As I start the coordinator node, I don't see any file access to the server.key or server.crt file? Aren't these files supp

Re: [GENERAL] [JDBC] JDBC connection test with SSL on PG 9.2.1 server

2013-02-04 Thread Adrian Klaver
On 02/04/2013 04:46 AM, Hari Babu wrote: On Friday, February 01, 2013 7:53 PM Adrian Klaver wrote: On 02/01/2013 06:06 AM, Hari Babu wrote: We tried the approach as suggested by you but still it is not working as shown in the below log (I had enabled logLevel as 1) keystore passowrd is qwerty

Re: [GENERAL] [JDBC] JDBC connection test with SSL on PG 9.2.1 server

2013-02-04 Thread Hari Babu
On Friday, February 01, 2013 7:53 PM Adrian Klaver wrote: >On 02/01/2013 06:06 AM, Hari Babu wrote: >> >> We tried the approach as suggested by you but still it is not working as >> shown in the below log (I had enabled logLevel as 1) >> keystore passowrd is qwerty >> 19:26:22.666 (1) PostgreSQL 9

Re: [GENERAL] [JDBC] JDBC connection test with SSL on PG 9.2.1 server

2013-02-01 Thread Adrian Klaver
On 02/01/2013 06:06 AM, Hari Babu wrote: We tried the approach as suggested by you but still it is not working as shown in the below log (I had enabled logLevel as 1) keystore passowrd is qwerty 19:26:22.666 (1) PostgreSQL 9.2 JDBC4 (build 1002) 19:26:23.451 (1) Receive Buffer Size is 4380

Re: [GENERAL] [JDBC] JDBC connection test with SSL on PG 9.2.1 server

2013-02-01 Thread Hari Babu
> On Tuesday, January 29, 2013 10:12 PM danap wrote: >> Hari Babu wrote: >>> On Monday, January 28, 2013 10:20 PM, Dave Cramer wrote: >>> >>> >>On Mon, Jan 28, 2013 at 9:03 AM, Hari Babu>> > wrote: >>> >>> >>While testing PostgreSQL JDBC java client to conn

Re: [GENERAL] JDBC connection test with SSL on PG 9.2.1 server

2013-01-29 Thread Adrian Klaver
On 01/28/2013 09:24 PM, Hari Babu wrote: > While testing PostgreSQL JDBC java client to connect to the PG 9.2.1 > database server using SSL. > we got the following behavior. > > The test steps as below: > > url = "jdbc:postgresql://" + "10.145.98.227" + ':' > + "8707" + '/' >

Re: [GENERAL] JDBC - Need to declare variables for values in insert statement

2013-01-28 Thread Bob Futrelle
I had read 'through' the JDBC material, but now reading more deeply with more insight. The API is useful too. Anyhoo, PreparedStatement works like a charm, viz., PreparedStatement pstmt= db.prepareStatement("insert into hello values ('cKey', ?)"); pstmt.setInt(1,intVar); pstmt.execute(); This a

Re: [GENERAL] JDBC - Need to declare variables for values in insert statement

2013-01-28 Thread Edson Richter
I would recommend the reading of the excellent The Java Tutorial, that has a very well explained section about JDBC: http://docs.oracle.com/javase/tutorial/jdbc/index.html and the chapter about PreparedStatements: http://docs.oracle.com/javase/tutorial/jdbc/basics/prepared.html Regards, Edso

Re: [GENERAL] JDBC - Need to declare variables for values in insert statement

2013-01-28 Thread Bob Futrelle
Thanks to Edson and Dave for lightning responses. I'm confident that your answers will do the job. I'll follow up on the advice AFTER I get my coffee ;-) I'm really focused on the NLP content of my research, but I need a DB infrastructure to do it right. (Not a bunch of files as in ancient times.)

Re: [GENERAL] JDBC - Need to declare variables for values in insert statement

2013-01-28 Thread Dave Cramer
Bob, Ok, have a look at PreparedStatement Essentially the same PreparedStatement pstmt= db.prepareStatement("insert into hello values ?") pstmt.setInt(1,intVar) pstmt.execute() Dave Cramer dave.cramer(at)credativ(dot)ca http://www.credativ.ca On Mon, Jan 28, 2013 at 1:50 PM, Bob Futrelle wr

Re: [GENERAL] JDBC - Need to declare variables for values in insert statement

2013-01-28 Thread Edson Richter
You have two options: st.execute("insert into hello values ('bKey', "+f1()+")"); or PreparedStatement st = db.prepareStatement("insert into hello values ('bKey', ?)"); st.setInteger(1, f1()); where 1 is the first parameter, 2 is the second parameter, and so on. Regards, Edson Richter

Re: [GENERAL] JDBC - Need to declare variables for values in insert statement

2013-01-28 Thread Bob Futrelle
Here's a small, but complete code example - Bob package us.tsos.dbs.pg; import java.sql.*; /** * This is an effort to get a computed value from a Java function * (or data object) included properly in the VALUES entries. * So, how can I declare an SQL variable and set its value to some Java va

Re: [GENERAL] JDBC - Need to declare variables for values in insert statement

2013-01-28 Thread Dave Cramer
Bob, Can you provide a snippet of code so I can understand what you mean by declare ? Dave Cramer dave.cramer(at)credativ(dot)ca http://www.credativ.ca On Mon, Jan 28, 2013 at 7:11 AM, Bob Futrelle wrote: > Do the declare statements and insert all have to be done in one statement > execute()

Re: [GENERAL] JDBC to load UTF8@psql to latin1@mysql

2012-12-14 Thread Emi Lu
On 12/14/2012 01:37 PM, Emi Lu wrote: Hello All, Meh. That character renders as \310 in your mail, which is not an assigned code in ISO 8859-1. The numerically corresponding Unicode value would be U+0090, which is an unspecified control character. Oh, scratch that, apparently I can't do hex/

Re: [GENERAL] JDBC to load UTF8@psql to latin1@mysql

2012-12-14 Thread Emi Lu
Hello All, Meh. That character renders as \310 in your mail, which is not an assigned code in ISO 8859-1. The numerically corresponding Unicode value would be U+0090, which is an unspecified control character. Oh, scratch that, apparently I can't do hex/octal arithmetic in my head first thing

Re: [GENERAL] JDBC to load UTF8@psql to latin1@mysql

2012-12-14 Thread Adrian Klaver
On 12/14/2012 07:35 AM, Tom Lane wrote: I wrote: Meh. That character renders as \310 in your mail, which is not an assigned code in ISO 8859-1. The numerically corresponding Unicode value would be U+0090, which is an unspecified control character. Oh, scratch that, apparently I can't do hex/

Re: [GENERAL] JDBC to load UTF8@psql to latin1@mysql

2012-12-14 Thread Tom Lane
I wrote: > Meh. That character renders as \310 in your mail, which is not an > assigned code in ISO 8859-1. The numerically corresponding Unicode > value would be U+0090, which is an unspecified control character. Oh, scratch that, apparently I can't do hex/octal arithmetic in my head first thin

Re: [GENERAL] JDBC to load UTF8@psql to latin1@mysql

2012-12-14 Thread Tom Lane
Emi Lu writes: > For now, through the following method, all letters are correctly > transformed except "È". Meh. That character renders as \310 in your mail, which is not an assigned code in ISO 8859-1. The numerically corresponding Unicode value would be U+0090, which is an unspecified contro

Re: [GENERAL] JDBC to load UTF8@psql to latin1@mysql

2012-12-14 Thread Emi Lu
On 12/14/2012 09:49 AM, Adrian Klaver wrote: Original Poster Thanks. And more info: Mysql +--++ | Variable_name| Value | +--++ | character_set_client | latin1 | | character_set_connection | latin1 | | character_set_

Re: [GENERAL] JDBC to load UTF8@psql to latin1@mysql

2012-12-14 Thread Adrian Klaver
On 12/14/2012 06:06 AM, Emi Lu wrote: What does OP stand for? Original Poster. Emi -- -- Adrian Klaver adrian.kla...@gmail.com -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] JDBC to load UTF8@psql to latin1@mysql

2012-12-14 Thread Emi Lu
Yeah, I agree this is the right answer here, since you're using JDBC. By the time you get a String from the MySQL driver, it's already in Java's 2-bytes-per-char format. And the Postgres driver will deal with the encoding on the output side. So the code I provided won't help you. I'm afraid I don'

Re: [GENERAL] JDBC to load UTF8@psql to latin1@mysql

2012-12-13 Thread Tom Lane
Paul Jungwirth writes: > Yeah, I agree this is the right answer here, since you're using JDBC. By > the time you get a String from the MySQL driver, it's already in Java's > 2-bytes-per-char format. And the Postgres driver will deal with the > encoding on the output side. So the code I provided wo

Re: [GENERAL] JDBC to load UTF8@psql to latin1@mysql

2012-12-13 Thread Thomas Kellerer
Emi Lu wrote on 13.12.2012 15:00: Is there a simple way to load UTF8 data in psql to mysql(with latin1 encoding) through JDBC? All you need to do is to query the source database, then use ResultSet.getString() to obtain the data and use a PreparedStatement and PreparedStatement.setString() to

Re: [GENERAL] JDBC to load UTF8@psql to latin1@mysql

2012-12-13 Thread Paul Jungwirth
> The JDBC drivers will handle all the conversion. > Do NOT manually convert the data. Yeah, I agree this is the right answer here, since you're using JDBC. By the time you get a String from the MySQL driver, it's already in Java's 2-bytes-per-char format. And the Postgres driver will deal with th

Re: [GENERAL] JDBC to load UTF8@psql to latin1@mysql

2012-12-13 Thread Emi Lu
I don't think your Java code does what you think it does. You should read some more about how Java handles string encodings. Here is a method I wrote some years ago that might also help you. It converts streams, not strings, but what you need should be pretty close (and simpler): /** * Inte

Re: [GENERAL] JDBC to load UTF8@psql to latin1@mysql

2012-12-13 Thread Edson Richter
Em 13/12/2012 12:00, Emi Lu escreveu: Is there a simple way to load UTF8 data in psql to mysql(with latin1 encoding) through JDBC? All you need to do is to query the source database, then use ResultSet.getString() to obtain the data and use a PreparedStatement and PreparedStatement.setString(

Re: [GENERAL] JDBC to load UTF8@psql to latin1@mysql

2012-12-13 Thread Emi Lu
Is there a simple way to load UTF8 data in psql to mysql(with latin1 encoding) through JDBC? All you need to do is to query the source database, then use ResultSet.getString() to obtain the data and use a PreparedStatement and PreparedStatement.setString() to insert/update the data on the tar

Re: [GENERAL] JDBC to load UTF8@psql to latin1@mysql

2012-12-12 Thread Thomas Kellerer
Emi Lu wrote on 12.12.2012 17:17: Good morning, Is there a simple way to load UTF8 data in psql to mysql(with latin1 encoding) through JDBC? All you need to do is to query the source database, then use ResultSet.getString() to obtain the data and use a PreparedStatement and PreparedStatemen

Re: [GENERAL] JDBC to load UTF8@psql to latin1@mysql

2012-12-12 Thread Paul Jungwirth
I don't think your Java code does what you think it does. You should read some more about how Java handles string encodings. Here is a method I wrote some years ago that might also help you. It converts streams, not strings, but what you need should be pretty close (and simpler): /** * Interp

Re: [GENERAL] JDBC to load UTF8@psql to latin1@mysql

2012-12-12 Thread Emi Lu
Is there a simple way to load UTF8 data in psql to mysql(with latin1 encoding) through JDBC? JAVA codes work for most of characters, but not "-È". Someone knows why the following codes cannot load "-È" to mysql@latin1? Thanks a lot! -- public static String utf8_to_latin1(String str) thro

Re: [GENERAL] JDBC connections very occasionally hang

2011-10-27 Thread Tom Lane
Karl Wright writes: > ... By the end of that time I usually see between one and three "stuck" > threads, all waiting inside the JDBC driver for a response from the > postgresql server. I can provide a stack trace if requested. How about a stack trace from the connected backend? And what is its

Re: [GENERAL] JDBC Connection Errors

2011-08-28 Thread Ian Pilcher
On 08/28/2011 08:33 AM, Craig Ringer wrote: >> A client is hitting an issue with JDBC: >> org.postgresql.util.PSQLException: Connection refused. Check that the >> hostname and port are correct and that the postmaster is accepting >> TCP/IP connections. >> >> -pg_hba.conf is set to trust 0.0.0.0/0 (

Re: [GENERAL] JDBC Connection Errors

2011-08-28 Thread Craig Ringer
On 24/08/2011 6:47 AM, Sam Nelson wrote: Hi list, A client is hitting an issue with JDBC: org.postgresql.util.PSQLException: Connection refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections. -pg_hba.conf is set to trust 0.0.0.0/0 (IPv4 onl

Re: [GENERAL] JDBC Connection Errors

2011-08-24 Thread Thomas Markus
Hi, - check for open server socket: netstat -tulpen | grep postgres - try to force ipv4 for java with system property (a recent jre prefers ipv6): -Djava.net.preferIPv4Stack=true regards Thomas Am 24.08.2011 00:47, schrieb Sam Nelson: Hi list, A client is hitting an issue with JDBC: org.pos

Re: [GENERAL] JDBC Connection Errors

2011-08-23 Thread Guillaume Lelarge
On Tue, 2011-08-23 at 19:38 -0400, Dave Cramer wrote: > The only difference JDBC has over psql is that it has to connect via > tcpip. Not sure about pgadmin. > pgAdmin is like psql on this. It can use TCP connections, and socket connections. -- Guillaume http://blog.guillaume.lelarge.info

Re: [GENERAL] JDBC Connection Errors

2011-08-23 Thread Sam Nelson
Everything is remote. I thought of the IPv6 thing, but that seems unlikely - all connections are coming from the same system. Still, we'll ask them and try to get some more details about things like that. --- === Samuel Nelson Consistent State www.consistentstate.com 303-9

Re: [GENERAL] JDBC Connection Errors

2011-08-23 Thread Adrian Klaver
On Tuesday, August 23, 2011 6:58:13 pm Sam Nelson wrote: > Everything is remote. I thought of the IPv6 thing, but that seems > unlikely - all connections are coming from the same system. The easy way to test is to throw in an IPv6 rule that matches the IPv4 rule into pg_hba.conf. > > Still, w

Re: [GENERAL] JDBC Connection Errors

2011-08-23 Thread Adrian Klaver
On Tuesday, August 23, 2011 3:47:33 pm Sam Nelson wrote: > Hi list, > > A client is hitting an issue with JDBC: > org.postgresql.util.PSQLException: Connection refused. Check that the > hostname and port are correct and that the postmaster is accepting > TCP/IP connections. > > -pg_hba.conf is se

Re: [GENERAL] JDBC Connection Errors

2011-08-23 Thread Dave Cramer
The only difference JDBC has over psql is that it has to connect via tcpip. Not sure about pgadmin. Dave Cramer dave.cramer(at)credativ(dot)ca http://www.credativ.ca On Tue, Aug 23, 2011 at 6:47 PM, Sam Nelson wrote: > Hi list, > > A client is hitting an issue with JDBC: > org.postgresql.uti

Re: [GENERAL] JDBC driver throwing error while connecting to the slave server for partitioned table

2011-08-09 Thread Merlin Moncure
On Mon, Aug 8, 2011 at 8:14 AM, sameera vhora wrote: >  We are facing below issue after creating slony replication of > partitioning table in edb server 8.3. > >  This issue persist only on slave one not the primary one. > >  Below logs we found in tomcats. > > >  Error in postgresql driver initia

  1   2   3   >