Re: PreparedStatement vs. Statement problem - Mailing list pgsql-jdbc

From Oliver Jowett
Subject Re: PreparedStatement vs. Statement problem
Date
Msg-id 474E88DB.7030306@opencloud.com
Whole thread Raw
In response to ssl connection and webstart  ("Michael Andreasen" <michael@dunlops.com>)
Responses Re: PreparedStatement vs. Statement problem
List pgsql-jdbc
yoursoft wrote:
> Ok, the planner uses different way. I think the planner use the UNION in
> PreparedStatement and not the UNION ALL?
> How to rewrite the SQL to use the UNION ALL in preparedstatement?

You need an ORDER BY or the order is undefined and unpredictable. See
http://www.postgresql.org/docs/8.2/static/queries-order.html

There's no simple way to say "give me rows from this table first" other
than running a query on each table separately.

-O

pgsql-jdbc by date:

Previous
From: Oliver Jowett
Date:
Subject: Re: PreparedStatement vs. Statement problem
Next
From: "Albe Laurenz"
Date:
Subject: Re: ssl connection and webstart