[Kde-pim] Akonadi and PostgreSQL

Tobias Koenig tokoe at kde.org
Fri Mar 12 11:18:49 GMT 2010


On Thu, Mar 11, 2010 at 11:58:02PM -0500, Brian DeRocher wrote:
> Tobias and friends,
Hej Brian,

> (1) I'm new to KDE/QT programming.  What's up with all these
> QLatinString() constructor call?
If you just use

  QString foo = "Hello World"

"Hello World" is converted to a QString first before is is assigned
to foo. The ctor of QString uses the current system codec for the conversion
which might be UTF-8 on modern Linux systems. This causes unnecessary
instantiation of the codec, because the passed string can be represented
in Latin1, so the conversion from UTF-8 is not needed.
So for optimization we disabled the automatic char* -> QString ctor and
use this light-weight QLatin1String helper class instead.
As alternative you could also write

  QString foo = QString::fromLatin1( "Hello World" )

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

> (4) Do the settings Options allow "set search_path"?
No, you can't change the search path, but you can give the path to the
postgresql executable explicitely

> (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.
Hmm? What do you mean with schema here?
Akonadi just creates a new database 'akonadi' and fills in all its tables
there. The server can have separated databases for amarok etc. of course.

> (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.
No, remote just means that you can use it for terminal sessions for example,
however sharing the database between different Akonadi instances might cause
problems because not all data are stored inside the database, so you will run
into inconsistencies.

> Is that possible?  It would be nice in an enterprise
> environment to have one central database for all employees.
That's not what Akonadi is aimed for. It is not a groupware server, it is an
access API!
Use a groupware server for this purpose.

> (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.
Using QProcess gives us some more abstraction in this case and we do
not depend on any special version of the PG server library.

Ciao,
Tobias
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20100312/f58f4510/attachment.sig>
-------------- next part --------------
_______________________________________________
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