[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: getIndexInfo
Hi Toby,
On Saturday 04 May 2002 16:10, Tobias Downer wrote:
> Tim Pizey wrote:
> > Hi Toby,
> >
> > I have sent this to the list twice (mckoi@mckoi.com ?)
> > but it has not come through - is there a problem?
>
> The reason for this is *probably* because the mailing list configuration
> was changed slightly since you last subscribed. It now will not accept
> messages that appear to be from an address that isn't subscribed to the
> list. I just checked the subscription log and you are listed as
> 'tim@paneris.co.uk' but the mail you sent me is 'timp@paneris.org' so
> that could very likely be the problem.
>
> Strange that the mailing list software didn't return a message saying
> something to this effect.
It didn't.
> I can change your email address if you like,
> or you can subsubscribe and resubscribe as your current email address.
I have unsubscribed tim@paneris.co.uk and subscribed timp@paneris.org,
thanks for your help.
>
> > --------------- Original Message ------------------------
> >
> >
> > I have been lurking for a while, but have only just
> > returned to my project to enable http://www.melati.org/
> > to work with McKoi.
> >
> > (I don't know if you remember - but you told me what
> > bug was in Melati, but it took me six months to understand,
> > when MySQL also barfed at an attempt to get from a closed
> > ResultsSet I realised that Postgres was overly lax.)
> >
> > Anyway, Melati now supports MySQL, Postgres and
> > MSQL Server and I am keen to enable McKoi support.
> >
> > Things are going well, but I am getting some funny behaviours:
> >
> > CREATE TABLE (n t); fails where n=t
> > eg
> > CREATE TABLE t (date date);
> > CREATE TABLE f (float float);
>
> The following will work in Mckoi;
>
> CREATE TABLE t ( "date" date );
> CREATE TABLE f ( "float" float );
>
> You need to quote all identifiers if they are reserved words. Isn't
> this the same in PostgreSQL?
Yes it is.
So I might as well quote all identifiers?
>
> > No big deal, I just changed the field name from date to dated.
> >
> > CREATE UNIQUE INDEX id_idx ON user (id);
> > returns 0, which I take to be success, but when repeated
> > instead of saying 'index already exists' it again returns 0;
>
> This is because in Mckoi, 'CREATE INDEX' is a no-op. Currently indexes
> are automatically created in Mckoi. This will probably change in the
> future but right now the create index syntax doesn't do anything.
I thought as much
>
> > In Melati we use:
> > ResultSet index =
> > getDatabase().getCommittedConnection().getMetaData().
> > getIndexInfo(null, "", getDatabase().getDbms().
> > unreservedName(getName()), false, true);
> >
> > This seems to return an empty resultset,
> > I tried the following in the JDBCQueryTool
> >
> > SHOW JDBC_INDEX_INFO(null, APP, certificate, false, true);
> >
> > it returns nothing.
> >
> > The upshot is that the indices are created every time Melati is
> > started, but no error is thrown.
>
> This is the related to my answer above. Because only automatic indexes
> are supported currently, there is no support for 'getIndexInfo' at this
> time. When this is changed this JDBC call will be supported.
Shouldn't you return the automatic indices?
So, given that the repeated creation of indices at startup is not a problem,
it seems as though I have built a McKoi driver for Melati.
I would be very pleased if you or other members of the list would play with
it, and join the Melati list. (The Mckoi driver is only in CVS at the moment,
not in the tar.gz, and I would like some feedback before I roll out another
version).
The combination of Jetty, Mckoi and Melati seems to be very powerful and
useful.
cheers
timp