
While playing with ODBC and MapInfo 5.01, I came across this one:

drop table "MAPINFO_MAPCATALOG";

This doesn't work as it seems to ignore the quotes, and convert into lower
case.

Peter

-- 
       Peter T Mount peter@retep.org.uk
      Main Homepage: http://www.retep.org.uk
PostgreSQL JDBC Faq: http://www.retep.org.uk/postgres
 Java PDF Generator: http://www.retep.org.uk/pdf


Tue, 18 May 1999 21:22:59 +0100 (GMT)
Peter T Mount <peter@retep.org.uk>
I thought this was picked up ages ago?
> 
> While playing with ODBC and MapInfo 5.01, I came across this one:
> 
> drop table "MAPINFO_MAPCATALOG";
> 
> This doesn't work as it seems to ignore the quotes, and convert into lower
> case.

Works in psql, which I think means libpq is OK:

	test=> create table "TT" (x int);
	CREATE
	test=> drop table tt;
	ERROR:  Relation 'tt' does not exist
	test=> drop table "TT";
	DROP


-- 
  Bruce Momjian                        |  http://www.op.net/~candle
  maillist@candle.pha.pa.us            |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

Tue, 18 May 1999 17:34:01 -0400 (EDT)
Bruce Momjian <maillist@candle.pha.pa.us>
Re: [HACKERS] I thought this was picked up ages ago?
On Tue, 18 May 1999, Bruce Momjian wrote:

> > 
> > While playing with ODBC and MapInfo 5.01, I came across this one:
> > 
> > drop table "MAPINFO_MAPCATALOG";
> > 
> > This doesn't work as it seems to ignore the quotes, and convert into lower
> > case.
> 
> Works in psql, which I think means libpq is OK:
> 
> 	test=> create table "TT" (x int);
> 	CREATE
> 	test=> drop table tt;
> 	ERROR:  Relation 'tt' does not exist
> 	test=> drop table "TT";
> 	DROP

I tried it on mine (cvs update from last night) using psql and it failed
:-(

-- 
       Peter T Mount peter@retep.org.uk
      Main Homepage: http://www.retep.org.uk
PostgreSQL JDBC Faq: http://www.retep.org.uk/postgres
 Java PDF Generator: http://www.retep.org.uk/pdf


Wed, 19 May 1999 00:15:36 +0100 (GMT)
Peter T Mount <peter@retep.org.uk>
Re: [HACKERS] I thought this was picked up ages ago?
> On Tue, 18 May 1999, Bruce Momjian wrote:
> 
> > > 
> > > While playing with ODBC and MapInfo 5.01, I came across this one:
> > > 
> > > drop table "MAPINFO_MAPCATALOG";
> > > 
> > > This doesn't work as it seems to ignore the quotes, and convert into lower
> > > case.
> > 
> > Works in psql, which I think means libpq is OK:
> > 
> > 	test=> create table "TT" (x int);
> > 	CREATE
> > 	test=> drop table tt;
> > 	ERROR:  Relation 'tt' does not exist
> > 	test=> drop table "TT";
> > 	DROP
> 
> I tried it on mine (cvs update from last night) using psql and it failed
> :-(
> 

Can you try this exact example and see if that works?

-- 
  Bruce Momjian                        |  http://www.op.net/~candle
  maillist@candle.pha.pa.us            |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

Tue, 18 May 1999 19:54:42 -0400 (EDT)
Bruce Momjian <maillist@candle.pha.pa.us>
Re: [HACKERS] I thought this was picked up ages ago?
On Tue, 18 May 1999, Bruce Momjian wrote:

> > On Tue, 18 May 1999, Bruce Momjian wrote:
> > 
> > > > 
> > > > While playing with ODBC and MapInfo 5.01, I came across this one:
> > > > 
> > > > drop table "MAPINFO_MAPCATALOG";
> > > > 
> > > > This doesn't work as it seems to ignore the quotes, and convert into lower
> > > > case.
> > > 
> > > Works in psql, which I think means libpq is OK:
> > > 
> > > 	test=> create table "TT" (x int);
> > > 	CREATE
> > > 	test=> drop table tt;
> > > 	ERROR:  Relation 'tt' does not exist
> > > 	test=> drop table "TT";
> > > 	DROP
> > 
> > I tried it on mine (cvs update from last night) using psql and it failed
> > :-(
> > 
> 
> Can you try this exact example and see if that works?

Hmm weird, as it worked. I retried the experiment, and it worked - even
though last night I ended up dropping the database.

What I was trying to do was attempt to get MapInfo to use postgresql for
storing tables using ODBC. For it to work it needs a table called
MAPINFO_MAPCATALOG. The problem is the table/column name case. It sends
the following query which fails:

SELECT "SPATIALTYPE", "TABLENAME", "OWNERNAME", "SPATIALCOLUMN",
"DB_X_LL2, "DB_Y_LL", "DB_X_UR", "DB_Y_UR", "COORDINATESYSTEM", "SYMBOL",
"XCOLUMNNAME", "YCOLUMNNAME" FROM "MAPINFO_MAPCATALOG" WHERE TABLENAME =
'wds';

Obviously it's missing the "" from the where clause...

Ah well, back to the drawing board ;-)

Peter

-- 
       Peter T Mount peter@retep.org.uk
      Main Homepage: http://www.retep.org.uk
PostgreSQL JDBC Faq: http://www.retep.org.uk/postgres
 Java PDF Generator: http://www.retep.org.uk/pdf


Wed, 19 May 1999 07:02:46 +0100 (GMT)
Peter T Mount <peter@retep.org.uk>
Re: [HACKERS] I thought this was picked up ages ago?
> What I was trying to do was attempt to get MapInfo to use postgresql for
> storing tables using ODBC. For it to work it needs a table called
> MAPINFO_MAPCATALOG. The problem is the table/column name case. It sends
> the following query which fails:
> SELECT "SPATIALTYPE", "TABLENAME", "OWNERNAME", "SPATIALCOLUMN",
> "DB_X_LL2, "DB_Y_LL", "DB_X_UR", "DB_Y_UR", "COORDINATESYSTEM", "SYMBOL",
> "XCOLUMNNAME", "YCOLUMNNAME" FROM "MAPINFO_MAPCATALOG" WHERE TABLENAME =
> 'wds';
> Obviously it's missing the "" from the where clause...

That's interesting. It's inconsistant SQL, but would work on most
systems because they tend to convert unquoted names to upper case
internally, whereas Postgres converts them to lower case.

                        - Thomas

-- 
Thomas Lockhart				lockhart@alumni.caltech.edu
South Pasadena, California

Wed, 19 May 1999 13:06:24 +0000
Thomas Lockhart <lockhart@alumni.caltech.edu>
Re: [HACKERS] I thought this was picked up ages ago?