Title: Message

Hi PostgreSQL developers,

 

I am having trouble with PostgreSQL’s implementation of DataBaseMetaData.getTables() and looking at the code I found this comment and so I am writing to you.

 

The problem I am having is that If I create tables with uppercase letters like this

 

create table “FOO”  ( “NUM” numeric );

 

then I can´t use this code to check if the table exists

 

ResultSet rs = conn.getMetaData().getTables( null, null, “FOO”, null );

Boolean exists = rs.next();

 

I suppose it´s because the tableNamePattern is being converted toLowerCase()

 

                        // Added by Stefan Andreasen <[EMAIL PROTECTED]>

                        // Now take the pattern into account

                        sql.append(") and relname like '");

                        sql.append(tableNamePattern.toLowerCase());

                        sql.append("' order by relkind, relname");

 

I suggest to eliminate this conversion and leave the user do the conversion if he desires.

 

Greetings

 

Ricardo Andrés Capurro

Senior Software Developer

ATS Advanced Technology Solutions S.A.

Av. Corrientes 880 Piso 11

(C1043AAV) Buenos Aires

Argentina

Tel: +54-11-6393-4345 +54-11-4393-4345

Fax: +54-11-6393-4300

e-mail laboral: mailto:[EMAIL PROTECTED]

e-mail personal: mailto:[EMAIL PROTECTED]

web: http://www.ats.com.ar

ICQ#:  103449056 

 

Reply via email to