Re: [EXT] YNT: Need help tuning a query

2023-09-28 Thread Vladimir Sitnikov
Oh, I misplaced the added where conditions. It should have been as follows, however, the overall idea is the same --- orignial.sql +++ tuned_v2.sql @@ -83,6 +83,7 @@ AND (judg1.jrt_opt_out_flag <> 'Y' OR judg1.jrt_opt_out_flag IS NULL) ) sub0

Re: [EXT] YNT: Need help tuning a query

2023-09-28 Thread Vladimir Sitnikov
Steve, It looks like PostgreSQL was not able to push the join condition into group by subquery. The problematic bits in the PostgreSQL plan are -> Nested Loop Left Join (cost=3423317.32..4522882.01 rows=4 width=261) (actual time=30839.132..35117.682 rows=39 loops=1) Joi

Re: Right version of jdbc

2023-09-28 Thread Raivo Rebane
But goes worst if I am using postgis-geometry-2021.1.0.jar Raivo On Fri, Sep 29, 2023 at 8:14 AM Raivo Rebane wrote: > It goes better, if I add postgis-geometry-2.5.0.jar and Eclipse founds > > import org.postgis.Point; > > > Raivo > > On Fri, Sep 29, 2023 at 7:18 AM Raivo Rebane wrote: > >> I

Re: Right version of jdbc

2023-09-28 Thread Raivo Rebane
It goes better, if I add postgis-geometry-2.5.0.jar and Eclipse founds import org.postgis.Point; Raivo On Fri, Sep 29, 2023 at 7:18 AM Raivo Rebane wrote: > If I use this jar i give errors - Description Resource Path Location Type > PGgeometry cannot be resolved to a type ProcAddMushrooms.jav

Re: Right version of jdbc

2023-09-28 Thread Raivo Rebane
If I use this jar i give errors - Description Resource Path Location Type PGgeometry cannot be resolved to a type ProcAddMushrooms.java /KatseAPIs/src/main/java/MushroomAPIs line 22 Java Problem PGgeometry cannot be resolved to a type ProcAddMushrooms.java /KatseAPIs/src/main/java/MushroomAPIs line

Re: Right version of jdbc

2023-09-28 Thread Ron
On 9/28/23 01:18, Raivo Rebane wrote: [snip] I made a new Java application Eclipse Dynamic WEB application and want to use Postgres - PostgreSQL 10.14 [snip] What's wrong. Or is better to use more newer postgres. And then which jdbc-I need to use ? https://www.postgresql.org/support/versionin

Re: cast bytea to macaddr

2023-09-28 Thread Boris Zentner
Hi Matt, > > 1. What do the double parenthesis '(( Values ))' mean? Nothing, it was easier to continue typing and close one more on the phone. Single parenthesis are enough. > > 2. What is the 'x(field)' in the column alias? X(field) is just to make the example more readable. And name

Re: Right version of jdbc

2023-09-28 Thread Dave Cramer
The latest version of postgis-jdbc is Maven Repository: net.postgis » postgis-jdbc » 2021.1.0 (mvnrepository.com) Dave Cramer www.postgres.rocks On Thu, 28 Sept 2023 at 14:51, Raivo Rebane wrote: > Hi, > > The same problem o

Right version of jdbc

2023-09-28 Thread Raivo Rebane
Hi, The same problem of postgres-jdbc compatibility remains and I pushed it to github - https://github.com/raaivore/APIexperiment. I am using Postgres 15 and Java 1.8 and Tomcat9. Maybe somebody can help me to solve the problem. Regards Raivo

Re: cast bytea to macaddr

2023-09-28 Thread Matt Zagrabelny
Hi Boris, [bringing this email back to the mailing list] A couple of questions: 1. What do the double parenthesis '(( Values ))' mean? 2. What is the 'x(field)' in the column alias? Thanks for educating me! -m On Thu, Sep 28, 2023 at 10:34 AM Boris Zentner wrote: > Hi matt, > > This i

Re: Right version of jdbc

2023-09-28 Thread Dave Cramer
Please put this project on github so we can see it. Thanks Dave Cramer www.postgres.rocks On Thu, 28 Sept 2023 at 11:53, Raivo Rebane wrote: > Or may be I am using wrong version of Java - java version "17.0.8" > 2023-07-18 LTS > > Raivo > > On Thu, Sep 28, 2023 at 6:41 PM Raivo Rebane wrote:

Re: Right version of jdbc

2023-09-28 Thread Raivo Rebane
Or may be I am using wrong version of Java - java version "17.0.8" 2023-07-18 LTS Raivo On Thu, Sep 28, 2023 at 6:41 PM Raivo Rebane wrote: > Now I changed the Postgres Server to version 15 and making Tomcat 9.0 > project. > Now I am using postgresql-42.6.0.jar driver, but Tomcat gives error :

Re: Right version of jdbc

2023-09-28 Thread Rob Sargent
On 9/28/23 09:41, Raivo Rebane wrote: Now I changed the Postgres Server to version 15 and making Tomcat 9.0 project. Now I am using postgresql-42.6.0.jar driver, but Tomcat gives error : java.sql.SQLException: No suitable driver found for jdbc:postgresql://localhost:5432/mushroom_database What

Re: Right version of jdbc

2023-09-28 Thread Raivo Rebane
Now I changed the Postgres Server to version 15 and making Tomcat 9.0 project. Now I am using postgresql-42.6.0.jar driver, but Tomcat gives error : java.sql.SQLException: No suitable driver found for jdbc:postgresql://localhost:5432/mushroom_database What driver I have to use for suitable driver.

cast bytea to macaddr

2023-09-28 Thread Matt Zagrabelny
Greetings Pg folks, I have a database schema (not mine) that uses bytea to represent a MAC address. I'd like to create a view that casts that field into a MACADDR type. # \d lease4 Table "public.lease4" Column │ Type │ Collation │ Nullable │

Re: valid casts to anyarray

2023-09-28 Thread Philip Carlsen
> Per the comments for check_generic_type_consistency: > > * 2) All arguments declared ANYARRAY must have the same datatype, > *which must be a varlena array type. > This must be exactly the bit that I missed during my reading - thanks! > It has to not only have an element type, but hav

Re: Right version of jdbc

2023-09-28 Thread Dave Cramer
Dave Cramer www.postgres.rocks On Thu, 28 Sept 2023 at 02:18, Raivo Rebane wrote: > Hi, > > I made a new Java application Eclipse Dynamic WEB application and want to > use Postgres - PostgreSQL 10.14 on x86_64-pc-linux-gnu, compiled by gcc > (Ubuntu 9.3.0-10ubuntu2) 9.3.0, 64-bit and Postgis -