Bug #32504 | Column alias names not returned in query result set | ||
---|---|---|---|
Submitted: | 19 Nov 2007 21:01 | Modified: | 13 Sep 2012 8:40 |
Reporter: | Tony Pallas | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | Connector / J | Severity: | S3 (Non-critical) |
Version: | 5.1.5 | OS: | Linux (2.6.18-1.2798.fc6_HPTRAID) |
Assigned to: | CPU Architecture: | Any | |
Tags: | column alias, column naming, query result set |
[19 Nov 2007 21:01]
Tony Pallas
[20 Nov 2007 11:24]
Tonci Grgin
Hi Tony and thanks for your report. I believe this is a duplicate of Bug#31499. Can you check your code with "useOldAliasMetadataBehavior=true" as a configuration parameter in your JDBC URL please. What does calling ResultSetMetaData.getColumnLabel()say?
[21 Dec 2007 0:00]
Bugs System
No feedback was provided for this bug for over a month, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open".
[29 Oct 2008 2:00]
Andrew MacDonald
I can comment. I ran into this, because I assumed that getColumnName() would return the alias. From what I've been reading is that in previous versions, it did. getColumnLabel() returns what I was expecting. I was a little confused though, because getColumnName() does return the alias of a COUNT(*); rather than, "COUNT(*)". In any case, useOldAliasMetadataBehavior=true does make getColumnName() return what I, and I assume the submitter, was expecting. I'm just going to use getColumnLabel() though (now that I realize it's there).