Im tending to lean towards Paul's idea here. Specify somewhere that primary keys are a must. Aslong as it is explained as a requirement it should be okay. I think we also need to make it clear that the primary key should not be an attribute of the feature, but something like a unique number.
That still doesn't really solve the creation of new keys problem though, unless we add another requirement relating to that.
But then we do run the risk of imposing too many requirements on the users.
Sean
-----Original Message-----
From: Paul Ramsey [mailto:pramsey@anonymised.com]
Sent: Friday, 1 August 2003 5:47 AM
To: Chris Holmes
Cc: geoserver-devel@lists.sourceforge.net; Jody Garnett;
sean.geoghegan
Subject: Re: [Geoserver-devel] Featureid discussion [was] Re:
Breakout Datasource IRC [was] Re: Javadocs for DataSource
locking extensionChris Holmes wrote:
> But yes, this is a tough problem because we
> need to cover as many cases as possible, from the most
incredible dba
> who obviously sets up all his primary keys and sequences
right to the
> least skillful oracle newbie who doesn't even know what a
primary key
> is. We probably should just cast a wide net and try a few
different
> approaches for each datasource.I dunno, call me Evil, but I think that primary keys are a
must on tables you are expecting to transact. Prerequisites
to allowing tables to be published are not a crime, they just
have to be explained. For example, the transactional
mechanism for PostGIS is going to require the existance of a
new lock table. So there's a version dependency. OIDs in
PgSQL are not actually that great of a choice (I want to get
away from them in our mapserver connector too) because there
is no such thing as an OID index unless you explicitly create
one. Whereas, primary key indexes *are* automatically
created, so you get guaranteed great performance with PK
queries, and *maybe* great performance with OID queries (if
you have remembered to create an OID index).Paul
--
__
/
| Paul Ramsey
| Refractions Research
| Email: pramsey@anonymised.com
| Phone: (250) 885-0632
\_