From: David J. <dav...@di...> - 2001-07-24 18:54:04
|
On 2001.07.24 12:46:34 -0400 John Bellardo wrote: > On Tuesday, July 24, 2001, at 09:39 AM, David Jencks wrote: > > > [....] > >> So the engine doesn't track if the tables were created with delimited > >> identifiers? If the answer is "correct, it doesn't track them" then > >> the > >> following should work: > >> > >> create table "Foo"(...); > >> select * from "Foo"; > >> select * from foo; > >> > > I think the system tables would have Foo in them > > Which means if the metadata has a lowercase character in the identifier, > it must have been delimited. It leaves us with the ambiguous case of > create "FOO" and create foo. > > If there is, in fact, no other metadata flags that indicate a delimited > identifier then it doesn't have a difference if we extract it as > delimited. Example: > > create foo; > --> translated to create FOO; > > create "FOO"; > --> translated to create FOO; > > and the following both work: > > select * from foo; > --> translated to select * from FOO; > > select * from "FOO"; > --> translated to select * from FOO; > > It shouldn't make a difference if we create the table with a delimited > identifier when the name is all upper case (because the is no 'delimited > identifier' metadata flag). > > > > > > select * from foo > > translated to > > > > select * from FOO > > > > won't work. > > > > select * from "Foo" > > translated to > > select * from Foo > > > > would work. > > > > ???? > > > > > >> [...] > >> Unless my comments above are incorrect (has been know to happen > >> before :) then I'm against it. > >> > >> -John > > > > Unless my counter comments are incorrect (also has been known to > happen, > > frequently ;-) I'm for it. > > I'm still against the switch to undelimited identifiers because two > tables, "Foo" and "fOO" are ambiguous with undelimited identifiers, but > are valid with delimited identifiers. > > -John > Quite possibly I misunderstood what Ann proposed, I thought it was: If the identifier in the system tables could have arrived by undelimited definition, report it as such If the identifier must have been defined delimited (lowercase, spaces,...) report it delimited. Although, actually, now that I think about it, my solution in java is to report exactly what is in the system tables -- which means everything is undelimited. I'm not aware that the jdbc specs say anything about this, and I personally don't want to change my DatabaseMetaData code to add delimiters--- on the other hand (is this 3rd 4th or what) I'm not claiming to provide a valid create table string. david jencks > _______________________________________________ > Firebird-devel mailing list > Fir...@li... > http://lists.sourceforge.net/lists/listinfo/firebird-devel > > |