Re: mod-db postgresql and autoincrement
Hi Amelie: Sorry for the delay. I was not clear what was you problem :-( Hello Antonio, In fact, I had a lot of problems that I sloved by using the latest CVS version as you suggest it to me... so thanks a lot. 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 Yes, that was excatly my problem... thanks to Christian everything works perfectly now. I think the name of the table user should be changed in the mod-db example of cocoon because it is a problem for those who want to run it with postgresql. And using a trick like user to create the table is not totally clear. Furthermore, I think it would be nice to change a SQL request that don't work with postgresql. In the edit-groups file, it is the request that fill the current groups list. I suggest something like that : -- select gid, gname from groups where gid in (select gid from users_groups where uid=esql:parameter type=intxsp:expruid/xsp:expr/esql:parameter) order by gname -- Those changes should be interesting for newbies like me I think :) May be I should send this message to the cocoon-dev mailing list? Regards, Amélie - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mod-db postgresql and autoincrement
Hi Amelie: I am glad you got this running. I had the same problems too. I think the name of the table user should be changed in the mod-db example of cocoon because it is a problem for those who want to run it with postgresql. And using a trick like user to create the table is not totally clear. I totally agree with you. I suggested this too. Some months ago. But there is still the same code. I think this is not a priority right now... Antonio Gallardo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mod-db postgresql and autoincrement
On 21.Feb.2003 -- 02:53 PM, Am?lie Cordier wrote: 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? You have most likely forgotten to switch to the correct autoincrement module in cocoon.xconf and hence are using the default for HSQLDB. If you really need to support different RDBMS, follow the instructions in cocoon.xconf on how to do it. Search for PgsqlAutoIcrementModule. Chris. -- C h r i s t i a n H a u l [EMAIL PROTECTED] fingerprint: 99B0 1D9D 7919 644A 4837 7D73 FEF9 6856 335A 9E08 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mod-db postgresql and autoincrement
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 int4unique not null default nextval('usuarios_usr_id_seq'), loc_id int4not null, usr_nombre varchar(20) unique not null, usr_nombre_completo varchar(50), usr_password varchar(20), usr_habilitado int4not 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]