[Biojava-l] Different implementation of Sequence?

Rhett Sutphin rhett-sutphin at uiowa.edu
Fri Jun 6 10:45:12 EDT 2003


On Thursday, June 5, 2003, at 04:17  AM, Thomas Down wrote:
> schema.  MySQL implicitly creates an index for the primary
> key of a table, while PostgreSQL does not).

PostgreSQL automatically generates indexes for any UNIQUE column, which 
includes primary keys.

-- begin psql session
test=> CREATE TABLE foo ( bar VARCHAR(8), baz INTEGER, PRIMARY KEY 
(bar), UNIQUE (baz) );
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index 
'foo_pkey' for table 'foo'
NOTICE:  CREATE TABLE / UNIQUE will create implicit index 'foo_baz_key' 
for table 'foo'
CREATE TABLE
test=> \d foo
             Table "public.foo"
  Column |         Type         | Modifiers
--------+----------------------+-----------
  bar    | character varying(8) | not null
  baz    | integer              |
Indexes: foo_pkey primary key btree (bar),
          foo_baz_key unique btree (baz)

-- end psql session

This output is from PostgreSQL 7.3.3, but I'm pretty sure this feature 
has been there for a while.

This is not a particularly important point, perhaps, but I figured it 
might rule out one possible source of the problem.

Rhett

--
Rhett Sutphin
Research Assistant (Software)
Coordinated Laboratory for Computation Genomics
   and the Center for Macular Degeneration
University of Iowa - Iowa City - Iowa - 52246
mailto:rhett-sutphin at uiowa.edu



More information about the Biojava-l mailing list