AW: stringtype=unspecified is null check problem - Mailing list pgsql-jdbc

From Martin Handsteiner
Subject AW: stringtype=unspecified is null check problem
Date
Msg-id VI1PR1001MB1423F7050B1979EAF610D2C8E8FD9@VI1PR1001MB1423.EURPRD10.PROD.OUTLOOK.COM
Whole thread Raw
In response to Re: stringtype=unspecified is null check problem  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: stringtype=unspecified is null check problem  (Dave Cramer <davecramer@postgres.rocks>)
List 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
functionand 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 (" ")
andnot 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.




pgsql-jdbc by date:

Previous
From: Tom Lane
Date:
Subject: Re: stringtype=unspecified is null check problem
Next
From: Dave Cramer
Date:
Subject: [pgjdbc/pgjdbc] 10fb16: Revert "update lastEditYear (#2721)"