All Questions
Tagged with java postgresql
29 questions
0
votes
2
answers
65
views
How do I update Java prepared statements from Postgres 12 to Postgres 16?
I have a Java/JSP webapp that uses a Postgres database. I recently migrated the webapp from one server running Ubuntu 20.04 and Postgres 12 to another server running Ubuntu 24.04 and Postgres 16.
I'...
0
votes
2
answers
2k
views
Java PostgreSQL library seems to convert dates to local time zone automatically
PostgreSQL 14.6
Ubuntu 22.04
I am using postgresql-42.5.4.jar which I downloaded from pgJDBC. I use this library to get data from a database and display it on a website running locally. The web server ...
-1
votes
1
answer
2k
views
PostgreSQL claims my query has violated unique key constraint on id [closed]
I'm struggling with an error, and I think it has to do with PostgreSQL. I'm trying to insert values in a database created 3-4years ago. The java program use Hibernate and lombok.
The original program ...
0
votes
0
answers
172
views
Get index of JSON data in PostgreSQL
I have the next JSON structure in my PosgreSQL:
[
{
"name": "Ryzen 9",
"path": "fitnessappmaven\\src\\main\\java\\com\\klaro\\fitnessappmaven\\tempWorkoutIcons\\...
0
votes
1
answer
746
views
Update specified data in PostgreSQL/ JSON based on 2 conditions
I searched a lot to find solution and I found something similar but unfortunately I couldn't apply it to my case, maybe because I am yet new to Postgres. The link to this similar issue is here:
Update ...
0
votes
1
answer
121
views
When should I use Index on PostgreSQL? [closed]
In my Java (Spring Boot app), I have the following entity definition which has a relationship with Company entity via companyUuid property. I will also let users to search by name field. We do not ...
-1
votes
1
answer
579
views
pg replication connection not returns wal events to java code client , it hangs some times
Describe the issue
We are facing issue of pg replication slot not listen database wal events.
Once pg database restarted and we attach
Driver Version: 42.2.6
Java Version: JDK1.8
OS Version: Window 10
...
1
vote
2
answers
3k
views
PostgreSQL: PreparedStatement to execute set schema command
I need to execute in a Java application a SET schema ? statement, where the placeholder is replaced by a value provided at runtime by the caller.
I assumed I could use PreparedStatement to overcome ...
3
votes
1
answer
10k
views
Trying to connect a PostgreSQL database to Eclipse
I have a Postgres (version 9.2) database running on a Centos 7 machine, and I'm trying to connect to it from Eclipse Oxygen on a Windows 10 machine using the Data Source Explorer.
When I put in all ...
0
votes
1
answer
804
views
Eliminating PostgreSQL/database network latency: PL/Java stored procedure VS. Java code running on localhost
A couple years ago, I learned the hard way that having my Java application sitting on one server, with the database sitting on another, and having complex transactions that issue lots of queries each, ...
4
votes
1
answer
2k
views
What is the new JDBC 4.3 Connection Request feature with `beginRequest` & `endRequest` methods?
The JDBC 4.3 update arrived with Java 9 2017-10. Amongst its few changes is the new feature on Connection where the beginRequest and endRequest methods signals…
Hints to the driver that a request, ...
0
votes
1
answer
6k
views
Database Wrapper Design issue: No operator matches the given name and argument type(s)
I'm building a wrapper for DB access using AWS' Lambda functions Java, the issue I'm having is that Lambda parameters are JSON, thus typeless, so all incoming params are de-JSON'd into Strings, and ...
2
votes
1
answer
2k
views
Postgresql connection refused from java connection class [closed]
public class PostgreSQLJDBC {
public static void main(String args[]) {
System.out.println("looking for db connection");
Connection c = null;
try {
Class.forName(...
0
votes
1
answer
28
views
get result of search in database postgresql and work with it every time
I have a query who spend alot of time because there is thousand of ligne in the database, so I need if it's exist a method to put the result of the query some where and work with them the time i want. ...
1
vote
0
answers
2k
views
Set table name to variable in postgresql
I am trying to set the tablename dynamically in a postgresql query executed through a jdbc connection. Here is my code:
PreparedStatement query1 = null;
Connection conn = null;
//...