Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

table column metadata not returned when table name contains lowercase letters [JDBC106] #145

firebird-issue-importer opened this issue Oct 24, 2007 · 3 comments



Submitted by: Slawomir Mezyk (slawekme)

Assigned to: Roman Rokytskyy (rrokytskyy)

When table name contains lower case letters, metadata information about table columns is not returned from the driver. Below is code that illustrates the problem:

public class GetColumnsTest {

public static void main\(String\[\] args\) throws Exception \{

	// connection parameters
	String databaseURL = "jdbc:firebirdsql:test01";

	String user = "sysdba";

	String password = "masterkey";

	String driverName = "org\.firebirdsql\.jdbc\.FBDriver";

	String TableName = "TestTable";

	// connect to database
	java\.sql\.Connection c = java\.sql\.DriverManager\.getConnection \(databaseURL, user, password\);

	// create table 
	c\.createStatement\(\)\.execute\("CREATE TABLE \\"" \+ TableName \+ "\\" \(\\"Id\\" INT, \\"Name\\" VARCHAR\(20\)\)"\);

	// retrieve table column info
	java\.sql\.DatabaseMetaData md = c\.getMetaData\(\);
	java\.sql\.ResultSet rs = md\.getColumns\("", "", TableName, "%"\);

	// show results \(nothing shown if table name has lowercase letters\)
	while\(rs\.next\(\)\) \{
		System\.out\.println\(rs\.getString\(4\) \+ "\\t" \+ rs\.getString\(6\)\);


This is because table name is always converted to uppercase in function AbstractDatabaseMetadata.stripQuotes when there's no quotation marks to remove. The line 5802 of file src/main/org/firebirdsql/jdbc/ should be

        return pattern;

instead of

        return pattern\.toUpperCase\(\);

Commits: f1d278e

Copy link

@firebird-issue-importer firebird-issue-importer commented Feb 24, 2008

Commented by: Roman Rokytskyy (rrokytskyy)


Copy link

@firebird-issue-importer firebird-issue-importer commented Feb 24, 2008

Modified by: Roman Rokytskyy (rrokytskyy)

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

Fix Version: Jaybird 2.1.3 [ 10252 ]

Fix Version: Jaybird 2.2 [ 10053 ]

Copy link

@firebird-issue-importer firebird-issue-importer commented Aug 18, 2012

Modified by: @mrotteveel

status: Resolved [ 5 ] => Closed [ 6 ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant