Re: Right version of jdbc

2023-09-29 Thread Raivo Rebane
Hi, sometimes I am lucky and don't get the old error, but sometime not. I tried to use PreparedStatement, but I got error - org.postgresql.util.PSQLException: Can't use query methods that take a query string on a PreparedStatement. at org.postgresql.jdbc.PgPreparedStatement.executeUpdate(P

Gradual migration from integer to bigint?

2023-09-29 Thread James Healy
My organization has a number of very large tables (most 100s of GB, a couple over a Tb) that were created many years ago by a tool that defaulted to integer PKs rather than bigint. Those PKs have a number of integer FKs in related tables as well. We shouldn't have let them get so big, but that's a

Re: Right version of jdbc

2023-09-29 Thread Raivo Rebane
Sorry. I accidentally usin postgres 16, which was empty Many thanks for advise !!! Raivo On Sat, Sep 30, 2023 at 8:18 AM Raivo Rebane wrote: > May be I have to copy PostGis draiver also to tomcat/lib ? > > Raivo > > On Sat, Sep 30, 2023 at 8:01 AM Raivo Rebane wrote: > >> Hi, >> I copied the p

Re: Right version of jdbc

2023-09-29 Thread Raivo Rebane
May be I have to copy PostGis draiver also to tomcat/lib ? Raivo On Sat, Sep 30, 2023 at 8:01 AM Raivo Rebane wrote: > Hi, > I copied the postgres driver to Tomcat/lib. > PS C:\Program Files\Apache Software Foundation\Tomcat 9.0\lib> dir post* > Directory: C:\Program Files\Apache Software F

Re: Right version of jdbc

2023-09-29 Thread Raivo Rebane
Hi, I copied the postgres driver to Tomcat/lib. PS C:\Program Files\Apache Software Foundation\Tomcat 9.0\lib> dir post* Directory: C:\Program Files\Apache Software Foundation\Tomcat 9.0\lib Mode LastWriteTime Length Name - --

Re: cache lookup failed for function 0

2023-09-29 Thread Tom Lane
p...@pfortin.com writes: > As a test, rather than use INSERT, I recently wrote a python test script > to import some 8M & 33M record files with COPY instead. These worked with > last weekend's data dump. Next, I wanted to look into importing a subset > of columns using the below logic; but I'm ge

Re: cache lookup failed for function 0

2023-09-29 Thread Adrian Klaver
On 9/29/23 1:37 PM, p...@pfortin.com wrote: Hi, select version(); PostgreSQL 15.4 on x86_64-mageia-linux-gnu, compiled by gcc (Mageia 12.3.0-3.mga9) 12.3.0, 64-bit As a test, rather than use INSERT, I recently wrote a python test script to import some 8M & 33M record files with COPY instead.

Re: Right version of jdbc

2023-09-29 Thread Craig McIlwee
> for some reason the postgresql jar is not in the classpath. This is due to the way that Tomcat loads drivers, which is documented at [1]. In short, the JDBC driver should be placed in the tomcat/lib directory and removed from the application's WEB-INF/lib directory. After doing that, I was abl

cache lookup failed for function 0

2023-09-29 Thread pf
Hi, select version(); PostgreSQL 15.4 on x86_64-mageia-linux-gnu, compiled by gcc (Mageia 12.3.0-3.mga9) 12.3.0, 64-bit As a test, rather than use INSERT, I recently wrote a python test script to import some 8M & 33M record files with COPY instead. These worked with last weekend's data dump. Ne

Re: Right version of jdbc

2023-09-29 Thread postgresql439848
Am 29.09.23 um 20:42 schrieb Dave Cramer: On Fri, 29 Sept 2023 at 14:22, Raivo Rebane wrote: Thanks, there was really JDK 17 in use. I changed it to Java 1.8 PS C:\Program Files\Apache Software Foundation\Tomcat 9.0\bin> java -version java version "1.8.0_381" Java(TM) SE Runtime Environment (

Re: Right version of jdbc

2023-09-29 Thread Dave Cramer
On Fri, 29 Sept 2023 at 14:22, Raivo Rebane wrote: > Thanks, > > there was really JDK 17 in use. > I changed it to Java 1.8 > PS C:\Program Files\Apache Software Foundation\Tomcat 9.0\bin> java > -version > java version "1.8.0_381" > Java(TM) SE Runtime Environment (build 1.8.0_381-b09) > Java Ho

Re: Right version of jdbc

2023-09-29 Thread Raivo Rebane
Thanks, there was really JDK 17 in use. I changed it to Java 1.8 PS C:\Program Files\Apache Software Foundation\Tomcat 9.0\bin> java -version java version "1.8.0_381" Java(TM) SE Runtime Environment (build 1.8.0_381-b09) Java HotSpot(TM) 64-Bit Server VM (build 25.381-b09, mixed mode) but the sam

Re: pg_agent jobs

2023-09-29 Thread Adrian Klaver
On 9/29/23 08:55, Giovanni Biscontini wrote: Hello all members, here's my question: db version 14.5 we have to create a pg_agent job with 2 steps: 1_step execute query: if query result is true or find > 0 records then process next step, else it stops executing job 2_step execute batch command w

pg_agent jobs

2023-09-29 Thread Giovanni Biscontini
Hello all members, here's my question: db version 14.5 we have to create a pg_agent job with 2 steps: 1_step execute query: if query result is true or find > 0 records then process next step, else it stops executing job 2_step execute batch command we tried to seta as 1_step the query: SELECT EXIST

Re: Right version of jdbc

2023-09-29 Thread Dave Cramer
Dave Cramer www.postgres.rocks On Fri, 29 Sept 2023 at 06:19, Raivo Rebane wrote: > Hi, > > The code is : > package MushroomAPIs; > > import java.io.IOException; > import javax.servlet.ServletException; > import javax.servlet.annotation.WebServlet; > import javax.servlet.http.HttpServlet; > imp

Re: Right version of jdbc

2023-09-29 Thread Raivo Rebane
Hi, The code is : package MushroomAPIs; import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.s