[Kde-pim] Akonadi and PostgreSQL

Brian DeRocher brian at derocher.org
Fri Mar 12 04:58:02 GMT 2010


Tobias and friends,

I just read through dbconfigpostgresql.cpp and found it fun to learn.  I
was wondering what your next steps are for it and wanted to share a few
suggestions of my own.

(1) I'm new to KDE/QT programming.  What's up with all these
QLatinString() constructor call?  Are they really necessary?  It's been
several years since my C++ courses, but isn't there a way to create a
conversion operator...  yeah like this:

class Q_CORE_EXPORT QString
{
public:
...
#ifndef QT_NO_CAST_FROM_ASCII
inline QT_ASCII_CAST_WARN_CONSTRUCTOR QString(const char *ch) :
d(fromAscii_helper(ch)) {}

Then i thought g++ would automatically find this operator and use it
where needed, like:  settings.value( "foo" );  I suppose there's a
concern about encodings and code like this has been disabled.  And it's
used everywhere.

(2) It's unfortunate that QStringList postgresSearchPath is named
postgresSearchPath.  It would be nice to this variable name for PG's
real search_path.

(3) I wonder if you need postgresSearchPath at all.  Can we call
pg_config --bindir? ... Ugh just saw that it belongs to the
postgresql-server-dev-8.4 package, nevermind.

(4) Do the settings Options allow "set search_path"?

(5) It would be nice to give akondi a schema in an existing database.
This way i could join with other schemas like krecipe and amarok and
make that useful... somehow.

(6) I think i read the akondi database is usually local, but may be
remote.  The idea of a remote database is very appealing.  I could
configure both my laptop at home and my computer at work to connect to
the same database.  Is that possible?  It would be nice in an enterprise
environment to have one central database for all employees.  Assuming
this to be true, we'd have to provide the dba with a script to
initialize the schemas.  As a strict dba myself, i'm not a fan of having
applications create their own tables.

For example for DAViCal, role davical_dba created the tables and owns
them, while role davical_app uses them.  And yes, i'm excited to see the
new caldav resource being developed, but i don't know if it's integrated
with Akonadi.

(7) I was even thinking we could dlopen some PG server library and
forkexec and instance.  postmaster.h does have this function, but i
don't see a library we would load.  Anyway just thought this would
afford more control over the server than a QProcess.

Brian

--
http://brian.derocher.org



_______________________________________________
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