Re: PreparedStatement vs. Statement problem

From: Oliver Jowett <oliver(at)opencloud(dot)com>
To: yoursoft <yoursoft(at)freemail(dot)hu>
Cc: Postgres JDBC <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: PreparedStatement vs. Statement problem
Date: 2007-11-29 09:39:39
Message-ID: 474E88DB.7030306@opencloud.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Albe Laurenz 2007-11-29 09:42:37 Re: ssl connection and webstart
Previous Message Oliver Jowett 2007-11-29 09:21:35 Re: PreparedStatement vs. Statement problem