AW: stringtype=unspecified is null check problem

From: Martin Handsteiner <martin(dot)handsteiner(at)sibvisions(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
Cc: "pgsql-jdbc(at)lists(dot)postgresql(dot)org" <pgsql-jdbc(at)lists(dot)postgresql(dot)org>
Subject: AW: stringtype=unspecified is null check problem
Date: 2023-01-12 08:32:29
Message-ID: VI1PR1001MB1423F7050B1979EAF610D2C8E8FD9@VI1PR1001MB1423.EURPRD10.PROD.OUTLOOK.COM
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Thanks a lot, I think, this will help a lot of (java) users, and makes the usage of PostgreSQL DB a way better!

I had yesterday an idea for a solution on java side. As we have already a preprocessing with a jdbc wrapper, for function and procedure calls (in/out parameters are not working with postgres jdbc), I'll added preprocessing for the parameters.

I'll search the statement for all question marks (?) that are not inside a comment (-- \n, /* */), not in quotes (" ") and not in strings (' '), check the parameter, if it is null, and replace the ? by null, and reduce the parameter list.

I can link the code if you want, as it is Apache License 2.0.

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Dave Cramer 2023-01-12 13:27:52 [pgjdbc/pgjdbc] 10fb16: Revert "update lastEditYear (#2721)"
Previous Message Tom Lane 2023-01-12 03:13:13 Re: stringtype=unspecified is null check problem