Questions tagged [jdbc-postgres]

jbdc-postgres is the JBDC (Java Database Connectivity) driver for the PostgreSQL database system.

JDBC is a core API of Java 1.1 and later. It provides a standard set of interfaces to SQL-compliant databases.

PostgreSQL is an open source object-relational database system.

Helpful links:

See also

48 questions
1
vote
1 answer

Socket is being closed on server before postgres returns result - c3p0

This only happens when the system is under load. At least it is noticable then. Postgres 8.3.14 JDK 1.6 Tomcat 6 Machine has 7GB of memory I've noticed my postgres data directory is eating up my entire hd as well. I have postgres on a 100GB drive…
kgibbon
  • 726
  • 1
  • 15
  • 37
1
vote
0 answers

PostgreSQL JDBC driver uses JVM time zone when converting LocalDateTime at DST boundary

Why is a LocalDateTime value on the DST transition of the JVM's timezone shifted by one hour when it is passed to PostgreSQL by the current jdbc driver (42.5.4)? I understood from the docs that LocalDateTime should be passed through as if it were…
1
vote
1 answer

Kafka connect JDBC error despite giving schema and payload

I am getting the following error when I run kafka JDBC connector to PSQL: JsonConverter with schemas.enable requires "schema" and "payload" fields and may not contain additional fields. If you are trying to deserialize plain JSON data, set …
AE93
  • 155
  • 8
1
vote
1 answer

PostgreSQL CopyManager copyIn appears stuck doing nothing when using it with COPY FROM STDIN

I am trying to use PostgreSQL CopyManager copyIn functionality with COPY FROM STDIN as suggested in the docs for very fast copying from an InputStream into a database table. I am thinking of using this to continuously stream rows that are to be…
lmk
  • 654
  • 5
  • 21
1
vote
1 answer

Unable to insert into database using org.postgresql.copy.CopyManager when the data has japanese characters

I have been breaking my head over the past few hours at trying to figure out what's wrong with my code. This piece of code was all working fine until i received a file which had japanese characters in it. Notepad++ and even some online utility tools…
1
vote
1 answer

JDBCIO Calling Postgres Routine (Stored Proc) which takes a Custom Object Type as parameter

I'm trying to call a Postgres routine which takes a custom Object type as a parameter. create type person_type as ( first varchar, second varchar, is_real boolean ); My routine (stored proc): create function person_routine(person…
Chimmy
  • 157
  • 2
  • 10
1
vote
3 answers

Incorrect date fetched from Postgres

I have a field called deadline_date of type timestamp with time zone with value 2018-05-03 19:00:00-05. select deadline_date from invoice_details where file_name='BHDHSB.pdf'; deadline_date ------------------------ 2018-05-03…
din_oops
  • 698
  • 1
  • 9
  • 27
1
vote
1 answer

Text array in prepared statements returns null when using binary transfer

When using binary transfer in postgresql-jdbc, I'm having problems using a prepared statement that returns a text array type: it returns null where it should have value. In fact, in my tests it only occurs only starting from the 6th iteration in the…
alostale
  • 770
  • 1
  • 11
  • 21
1
vote
1 answer

Windows refuses postgres connection

I have a local network connecting 15 PCs. Every PC has postgres installed (8.3, 8.4, 9.2). Every database has the exact same installation parameters as name, user, password, etc. I'm using a Java application, which implements JDBC library and I…
arlokan
  • 88
  • 1
  • 9
1
vote
0 answers

Getting error while updating an image into database using Java Spring

I tried the code below. I'm using both image and text for update, but I'm getting an application error. Can't infer the SQL type to use for an instance of this error I'm getting. QuestionRef questionRef = ceBean.get("questionRef"); QuestionRef…
user51188
  • 96
  • 10
1
vote
0 answers

Understanding scala slick

Now, I'm writing sample for learning scala slick. I'm using some github projs and stackoverflow (Q&A)s. Below my sample code: import scala.slick.driver.PostgresDriver.simple._ import Database.threadLocalSession object TestApp extends App{ case…
Bob
  • 1,351
  • 11
  • 28
1
vote
2 answers

Error when inserting through JDBC

When I run the sql statement below through psql it works fine, but when I try to run the same query by building it with a preparedstatement, it fails. INSERT INTO Hvbp (provider_number, weighted_clinical_process, weighted_patience_experience,…
Hank
  • 3,367
  • 10
  • 48
  • 86
0
votes
0 answers

I upgraded JDBC driver to postgresql, strange thing happened

I upgraded JDBC from postgresql-9.2-1000.jar(PostgreSQL 9.2.1) to postgresql-42.5.0.jar(PostgreSQL 14.6) and strange thing happened. With the same query, It takes slow after fourth, or ninth execution. (It doesn't happen with…
Thttp
  • 1
0
votes
0 answers

Postgres Procedure call from Spring boot with Composite Array type as Input and Output

Good Day ! As a part of POC , I'm calling a procedure from my Spring boot code as below and I'm able to make the call with Composite Array type [In & Out]. However , I want to check if there is any better way for doing it. As you can see below , the…
Sid
  • 471
  • 1
  • 6
  • 19
0
votes
0 answers

JRuby: How to use the ActiveRecord postgresql adapter without `pg`, which is written in C?

Trying to use ActiveRecord with Postgres on JRuby 9.3.3.0 on Mac Catalina 10.15.7, with the Postgres server running. Followed the instructions at github.com/jruby/activerecord-jdbc-adapter per @hmdne advice. I see the error: NameError:…