Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] Some generated queries fail in PostgreSQL with pgjdbc-ng driver

That's Postgresql, the only database engine I know of that does this.
Asking EL to fix this is probably not a bad idea, because the
Postgresql people behave like gods. The problem is normally in the
engine not the driver.

They have an excuse for why they expect that even null has a type
parameter so you cannot write some standard JPQL queries.

See https://github.com/pgjdbc/pgjdbc/issues/3 for another example.

I would try to use the EL "cast" extension as a workaround. This
solved all my problems.

Otherwise if I was you I wouldn't hesitate to make a lot of noise in
the Postgresql mailing lists - they are so unprofessional they do not
even have a bug tracking system. Really, I am not joking. You can't
find out the status of anything that you report there.

Regards,

Bernard

On Tue, 27 Aug 2013 09:38:58 +0200 (CEST), you wrote:

><div>When I have JPQL-queries like this:</div>
>
><div> </div>
>
><div><span style="font-family:courier new,courier,monospace;">SELECT e FROM Entity e WHERE NOT EXISTS(SELECT ms FROM OtherEntity ms WHERE ...)</span></div>
>
><div> </div>
>
><div>EL generates a query like:</div>
>
><div> </div>
>
><div><span style="font-family:courier new,courier,monospace;">SELECT ..... WHERE NOT EXISTS (SELECT <span style="background-color: rgb(255, 255, 0);">$1</span> FROM my_entity WHERE ...)</span></div>
>
><div> </div>
>
><div>EL inserts the value Integer(1) for $1.</div>
>
><div> </div>
>
><div>This doesn't work well with the new pgjdbc-ng driver: <a href="https://github.com/kdubb/pgjdbc-ng/issues/8";>https://github.com/kdubb/pgjdbc-ng/issues/8</a></div>
>
><div> </div>
>
><div>The official driver works around the issue but it would be nice if EL generated queries like &quot;SELECT ?::int&quot; for this, instead of &quot;SELECT ?&quot;.</div>
>
><div> </div>
>
><div>This won't affect applications and should be a fully compatible change. Any chance to fix this?</div>
>
><div> </div>
>
><div>Thanks.</div>
>
><div> </div>
>
><div class="origo-email-signature">--<br>
>Andreas Joseph Krogh &lt;andreak@xxxxxxxxxxxx&gt;      mob: +47 909 56 963<br>
>Senior Software Developer / CTO - OfficeNet AS - http://www.officenet.no<br>
>Public key: http://home.officenet.no/~andreak/public_key.asc</div>



Back to the top