473,811 Members | 2,557 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.column name)
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*******@postg resql.org so that your
message can get through to the mailing list cleanly

Nov 23 '05 #1
2 1708


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.column name)
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.column name) 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.column name)
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.column name) 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*******@postg resql.org

Nov 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
2272
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 was working fine until a while ago. I haven't watched it recently, and haven't changed anything I am aware off right now. After I realized the problem I tried many 3.08 versions with the same symptom. Watch were it says "Unknown system variable...
0
1967
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 SQLTables when using the DB2 Connect Client v7.1.0.40, the call results in the following query SQLTables( hStmt=1:1, szTableQualifier=Null Pointer, cbTableQualifier=0, szTableOwner="P390", cbTableOwner=-3,
2
11560
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 with identity column also, (so if i use generated as always, i can't do insert into new_tables select * from old_table), then i might also insert new data into this new table (if i do generated by default, then the new table could have the same...
4
4469
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) || ' ' || substr(char(v.creationdate),12,2) || ':' || substr(char(v.creationdate),15,2) || ':' || substr(char(v.creationdate),18,2), '')) ||'~' || rtrim(coalesce(substr(char(v.lastmodifieddate),1,4) || '-' ||
9
2669
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 position? void rtrim(char *str) { for( int i=strlen(str)-1; i>= 0; i-- ) {
2
4561
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 can. I'm using Eclipse 3.2.2 and I have installed mysql-connector-java-5.0.6-bin.jar. I am trying to connect to SQL Enterprise Manager version 8.0 innstall on a Windows 2003 Server Enterprise Edition. I have been able to successfully test...
12
1400
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - How do I trim whitespace - LTRIM/RTRIM/TRIM? ----------------------------------------------------------------------- Using Regular Expressions (JavaScript 1.2/JScript 3+) : String.prototype.lTrim = function() { return this.replace(/^\s+/,'');
0
604
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 your commit is coming from. Jim -- Replace part of the email address: kennedy-down_with_spammers@attbi.com with family. Remove the negative part, keep the minus sign. You can figure it out.
5
2967
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 SQL Server 2005. Anybody know if this change in behavior is documented? If it is intentional? Is there a "quick fix" to revert to the old behavior (to automatically RTRIM the results of SYSTEM_USER in 2005) until code can be changed?
0
9605
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10651
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10392
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10136
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9208
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7671
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5555
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3868
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3020
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.