db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel John Debrunner <...@debrunners.com>
Subject Re: (DERBY-13) Quoted names with embedded period mishandled in from
Date Wed, 05 Jan 2005 20:32:18 GMT
Hash: SHA1

I think we need to reset on Derby-13, and also look at Derby-18 at the
same time. I was confused over the exposed correlation name, thinking it
had a schema, but it doesn't.

A table in a list either has an exposed table name or an exposed
correlation name. The correlation name is defined by the AS clause and
can not have a schema.

Thus with

set current schema A
select ... FROM T1, B.T2, T3 AS TC

there should be three exposed names

A.T1 as an exposed <table name>
B.T2 as an exposed <table name>
TC as an exposed <correlation name>

The SQL standard rules are then (for table references in the same scope)

1) No duplicates can exist among the exposed <table name>s
2) No duplicates can exist among the exposed <correlation name>s
3) Any <correlation name> must not be the same as the unqualifed part of
any exposed <table name>

One option in the code might be to have

// Returns the exposed table name,
// returns null if the table has a correlation name
TableName getExposedTableName()

// Returns the exposed correlation name,
// returns null if the table does not have a correlation name
String getExposedCorrelationName()

Thus to keep the two concepts separate (since they are), rather than
trying to shoehorn them into a single value (as the current code does).
Then the duplicate checking would have to be smarter.

I think this would also enable the dubious null schema handling in
TableName to be removed, as TableNames should always have a schema.


Version: GnuPG v1.2.5 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org


View raw message