The semantics of Zope's database functionality is such that duplicate column
names are not (and probably never will be) possible in the same result set.
This is because Zope expects to access columns by name rather than position.
Therefore each one must have a distinct name.
The only workaround I can see would be some sort of automatic renaming of
columns, but that sounds like a bad idea since it introduces some serious bug
potential if the columns are renamed differently then the application
Just for curiousity, what is the use case for returning multiple columns with
the same name? Sounds dubious to me.
On Tuesday 17 December 2002 02:11 pm, Ross J. Reedstrom wrote:
> Same problem has been reported with Oracle 8.1, since it too will return
> duplicate names. The SQL92 spec is a bit ambiguous about whether all
> returned column names must be unique.
> On Tue, Dec 17, 2002 at 01:09:13PM -0500, Adam Manock wrote:
> > specifically with:
> > SELECT W1.city, W1.temp_lo AS low, W1.temp_hi AS high,
> > W2.city, W2.temp_lo AS low, W2.temp_hi AS high
> > FROM weather W1, weather W2
> > WHERE W1.temp_lo < W2.temp_lo
> > AND W1.temp_hi > W2.temp_hi;
> > Error, exceptions.ValueError: Duplicate column name, city
> > Traceback (innermost last):
> > Module ZPublisher.Publish, line 98, in publish
> > Module ZPublisher.mapply, line 88, in mapply
> > Module ZPublisher.Publish, line 39, in call_object
> > Module Shared.DC.ZRDB.Connection, line 115, in manage_test
> > Module Shared.DC.ZRDB.Results, line 52, in __init__
> > ValueError: Duplicate column name, city
Zope-Dev maillist - [EMAIL PROTECTED]
** No cross posts or HTML encoding! **
(Related lists -