Hi Amelie:

Sorry for the delay. I was not clear what was you problem.... :-(

1-The pointed by Christian is correct, in cocoon.xconf check you have:


<autoincrement-modules>
  <component-instance
    logger="core.modules.auto"
    name="auto"      
class="org.apache.cocoon.components.modules.database.PgsqlAutoIncrementModule"/>
</autoincrement-modules>

2-IN order to make use of this module, you must to create on the database
SEQUENCES like this....

-- Autonumerico de usuarios
CREATE SEQUENCE usuarios_usr_id_seq
  start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1;

Please check that the name of the SEQUENCE must be:

tableName_fielName_seq

To follow the example. The table usuarios is create by the following SQL
code:

*************************************
CREATE TABLE Usuarios
  (
    usr_id       int4            unique not null default
nextval('usuarios_usr_id_seq'),
    loc_id       int4            not null,
    usr_nombre   varchar(20)     unique not null,
    usr_nombre_completo varchar(50)    ,
    usr_password varchar(20)    ,
    usr_habilitado int4            not null default 1,

    primary key(usr_id),

    foreign key(loc_id) references Localidades(loc_id) on update CASCADE,

    CHECK(usr_habilitado BETWEEN 0 AND 1)
  );

CREATE INDEX UsuariosNDX1 ON Usuarios(loc_id);

***********************************

I hope it will help you. :-D

Best Regards,

Antonio Gallardo



Amélie Cordier dijo:
> Hello everybody
>
> I'm trying to run mod-db example (the one with users and groups) using
> PostgreSQL.
>
> Currently, everything work perfectly except the autoincrement attribute.
>
> The error I have is this one :
>
>  ---
> |org.apache.cocoon.components.modules.output.OutputModule:  ="ERROR:
> parser: parse error at or near "call" "
>  ---
>
> I read in the mailing list archive a lot of interesting things but I had
> not found any clue to solve my problem.
>
> Is there anybody who can help me?
>
> Regards,
>
> Amélie Cordier
>
>
> ------------------
> My configuration :
>
> OS: Debian 3.0
> Tomcat 4.1.10
> Cocoon 2.1-dev (latest CVS HEAD version)
> JDK 1.4
>
>
>
>
>
>
>
>
>
> --------------------------------------------------------------------- To
> unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to