473,385 Members | 1,764 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

RTRIM always used with JDBC?

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
2 1687


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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Nils Valentin | last post by:
Hi MySQL Fans ;-), Is it possible that the 3.08 series allows to connect to 4.0.14 versions but not to the 4.1 alpha-versions ? I get belows error when tryig to connect from DbVisualizer which...
0
by: Rashmi Dixit | last post by:
Hi, My application accesses DB2 over DB2 CLI and we use the calls SQLTables, SQLTablePrivileges, SQLColoumns to retrieve the schema information from the system catalog tables. When we call...
2
by: db2group88 | last post by:
i would like to know when i create a table with identity column, should i used generated by default or generated as always. since when i create this table, i might copy some data from another table...
4
by: rajdb2 | last post by:
Hi, I am using the following sql statement SELECT rtrim(rtrim(coalesce(substr(char(v.creationdate),1,4) || '-' || substr(char(v.creationdate),6,2) || '-' || substr(char(v.creationdate),9,2) ||...
9
by: alan | last post by:
Hello, can somebody help me with this self written rtrim function? i do always get a access violation on the line where i want to terminate the string: str = '\0'; why can't i acces this specific...
2
by: bevis | last post by:
I'm new to sql server and mysql but this seems like it should be a pretty straight forward jdbc connection. But I have spent almost 2 days just trying to get a jdbc connection. Please help if you...
12
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - How do I trim whitespace - LTRIM/RTRIM/TRIM?...
0
by: Jim Kennedy | last post by:
ALL DDL does a commit. Hence Drop Table movies; issues a commit. True you don't issue a commit and the driver does not issue a commit, but the server does for all DDL. That is probably where...
5
by: brian.j.parker | last post by:
Hey all, I've noticed an obscure little quirk: it appears that if you use a login with trailing spaces on the name, SYSTEM_USER automatically trims those trailing spaces in SQL Server 2000, but not...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.