By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,594 Members | 3,017 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,594 IT Pros & Developers. It's quick & easy.

RTRIM always used with JDBC?

P: n/a
Hi,

i am using Postgres 7.4.2 with jdbc. Every time i try to select a
varchar the SQL generated by the jdbc driver uses RTRIM(t0.columnname)
which breaks an existing application. Is this normal, can we disable
the RTRIM usage?

regards David
---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to ma*******@postgresql.org so that your
message can get through to the mailing list cleanly

Nov 23 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a


On Sun, 16 May 2004, David Teran wrote:
i am using Postgres 7.4.2 with jdbc. Every time i try to select a
varchar the SQL generated by the jdbc driver uses RTRIM(t0.columnname)
which breaks an existing application. Is this normal, can we disable
the RTRIM usage?


I assume from this bold claim that you have written an SQL query like
"SELECT t0.columnname FROM ..." and enabled statement logging in the
server and seen the executed query come through as "SELECT
RTRIM(t0.columnname) FROM ...". If this is the case then you are not
using the community supported jdbc driver because it never uses rtrim, and
you need to contact whoever wrote the jdbc driver you are using.

If you are having some unspecified problem with trailing spaces you need
to provide a description of your actual problem and ideally a test case
rather than jumping to conclusions about the JDBC driver and RTRIM.

Kris Jurka
---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

Nov 23 '05 #2

P: n/a
Hi Kris,

i am using Postgres 7.4.2 with jdbc. Every time i try to select a
varchar the SQL generated by the jdbc driver uses RTRIM(t0.columnname)
which breaks an existing application. Is this normal, can we disable
the RTRIM usage?


I assume from this bold claim that you have written an SQL query like
"SELECT t0.columnname FROM ..." and enabled statement logging in the
server and seen the executed query come through as "SELECT
RTRIM(t0.columnname) FROM ...". If this is the case then you are not
using the community supported jdbc driver because it never uses rtrim,
and
you need to contact whoever wrote the jdbc driver you are using.

I use the JDBC driver from the postgres742 installation. But i am also
using a middleware / eor tool named webobjects from apple ... and one
of our sourcecodes superclasses generated the rtrim. Thanks for your
hint, it works now.

Regards David
---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to ma*******@postgresql.org

Nov 23 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.