[Mediawiki-l] PageSecurity and Postgresql

Greg Sabino Mullane greg at turnstep.com
Mon Feb 12 18:45:48 UTC 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160


> Error: 1 ERROR:  relation "security_definition_id_seq" does not exist

Don't use the SERIAL type when creating the tables. Mediawiki assumes 
that sequences have certain names, so you should explcitly name them 
when creating your tables, like this:

CREATE SEQUENCE security_definition_id_seq;
CREATE TABLE security_definitions (
  security_definition_id INTEGER NOT NULL
    PRIMARY KEY DEFAULT nextval('security_definition_id_seq'),


> WHAT IS WRONG???? Now, seen that, I think that there are two consecutive
> selections (nextval) from the sequence that obtain the same number????

No, it returned a 1 and then a 2. The error you saw:

> SQL ERROR (ignored): ERROR:  duplicate key violates unique constraint
> "security_definition"

is a unique constraint on security_definition_items.security_definition_id. 
Are you sure that field is supposed to be unique? That would mean only 
one "action" per security_definition, which may be defeating the purpose 
of having a second table.

- --
Greg Sabino Mullane greg at turnstep.com
PGP Key: 0x14964AC8 200702121336
http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8
-----BEGIN PGP SIGNATURE-----

iD8DBQFF0LS6vJuQZxSWSsgRAxvVAJ931WRTfZCzv4cVRt9QA7p8qiAFmwCg7KrI
ZGAOUOJzUJjito3dJ0gxj+0=
=Lzk7
-----END PGP SIGNATURE-----





More information about the MediaWiki-l mailing list