[Kde-pim] Review Request: Postgresql support in akonadi

jgoday jgoday at gmail.com
Tue Jun 30 19:12:25 BST 2009



> On 2009-06-28 06:12:44, igorto wrote:
> > I was testing it in PostgreSQL 8.3 and i just tried to use the imap resource and i received these warnings:
> > [akonadiserver] Insert from DataStore::appendPimItem                            
> > [akonadiserver] WARNING:  nonstandard use of \\ in a string literal             
> > [akonadiserver] LINE 1: EXECUTE qpsqlpstmt_248 (30, 'PLD:ENVELOPE', '("Fri, 26 Jun 2...     
> > 
> > 
> > [akonadiserver] WARNING:  nonstandard use of \\ in a string literal             
> > [akonadiserver] LINE 1: EXECUTE qpsqlpstmt_1d4 (7, '\\Seen')                    
> > [akonadiserver] ^                                                               
> > [akonadiserver] HINT:  Use the escape string syntax for backslashes, e.g., E'\\'.
> > 
> > 
> > But with these warnings the imap resource works fine, but when i try to delete the imap resource i received the error message in database:
> > 
> > Application '/usr/local/bin/akonadi_imap_resource' exited normally...           
> > [akonadiserver] Error during executing query "DELETE FROM CollectionTable WHERE ( id = :0 )" :  "ERROR:  update or delete on table "collectiontable" violates foreign key constraint "collectiontable_parentid_fkey" on table "collectiontable" 
> > [akonadiserver] DETAIL:  Key (id)=(2) is still referenced from table "collectiontable".

The problem seems to be the relation between a collection and his childs, attributes and mime types,
with 'ON DELETE CASCADE' seems to work ok.

To update the existing tables


alter table collectiontable drop constraint collectiontable_parentid_fkey;
alter table collectiontable add CONSTRAINT collectiontable_parentid_fkey FOREIGN KEY (parentid) REFERENCES collectiontable(id) ON DELETE CASCADE ON UPDATE CASCADE;

alter table collectionattributetable DROP CONSTRAINT collectionattributetable_collectionid_fkey;
alter table collectionattributetable add CONSTRAINT collectionattributetable_collectionid_fkey FOREIGN KEY (collectionid) REFERENCES collectiontable(id) ON DELETE CASCADE ON UPDATE CASCADE;

alter table collectionmimetyperelation DROP constraint collectionmimetyperelation_collection_id_fkey;
alter table collectionmimetyperelation add constraint collectionmimetyperelation_collection_id_fkey FOREIGN KEY(collection_id) REFERENCES collectiontable(id) ON DELETE CASCADE ON UPDATE CASCADE;


- jgoday


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.kde.org/r/797/#review1406
-----------------------------------------------------------


On 2009-06-30 11:09:56, jgoday wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.kde.org/r/797/
> -----------------------------------------------------------
> 
> (Updated 2009-06-30 11:09:56)
> 
> 
> Review request for KDE PIM.
> 
> 
> Summary
> -------
> 
> Postgresql support in akonadi server/Storage
> 
> 
> Diffs
> -----
> 
>   /trunk/kdesupport/akonadi/server/src/handler/aklist.cpp 989703 
>   /trunk/kdesupport/akonadi/server/src/storage/akonadidb.xml 989703 
>   /trunk/kdesupport/akonadi/server/src/storage/akonadidb.xsd 989703 
>   /trunk/kdesupport/akonadi/server/src/storage/dbinitializer.cpp 989703 
>   /trunk/kdesupport/akonadi/server/src/storage/entities-source.xsl 989703 
>   /trunk/kdesupport/akonadi/server/src/storage/entities.xsl 989703 
>   /trunk/kdesupport/akonadi/server/src/storage/entity.h 989703 
>   /trunk/kdesupport/akonadi/server/src/storage/querybuilder.cpp 989703 
>   /trunk/kdesupport/akonadi/server/src/tests/CMakeLists.txt 989703 
>   /trunk/kdesupport/soprano/backends/CMakeLists.txt 989703 
> 
> Diff: http://reviewboard.kde.org/r/797/diff
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> jgoday
> 
>

_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/



More information about the kde-pim mailing list