Summary: | Akonadi fails to start with postgres backend. Possibly due to wrong escape '\\ANSWERED' | ||
---|---|---|---|
Product: | [Frameworks and Libraries] Akonadi | Reporter: | Esben Mose Hansen <kde> |
Component: | general | Assignee: | kdepim bugs <kdepim-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | asturm, david, matlads, rdieter, vmikhailikov |
Priority: | NOR | ||
Version: | 4.5 | ||
Target Milestone: | --- | ||
Platform: | Unlisted Binaries | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/akonadi/0a348cc98a458227bb28d89de584b61e31e1e9a8 | Version Fixed In: | 1.10.3 |
Description
Esben Mose Hansen
2010-09-23 12:05:54 UTC
*** Bug 254926 has been marked as a duplicate of this bug. *** This can be fixed by enabling the "standard_conforming_strings" option in your postgresql.conf file. http://www.postgresql.org/docs/9.0/static/sql-syntax-lexical.html#SQL-SYNTAX-STRINGS "If the configuration parameter standard_conforming_strings is off, then PostgreSQL recognizes backslash escapes in both regular and escape string constants. This is for backward compatibility with the historical behavior, where backslash escapes were always recognized. Although standard_conforming_strings currently defaults to off, the default will change to on in a future release for improved standards compliance. Applications are therefore encouraged to migrate away from using backslash escapes. If you need to use a backslash escape to represent a special character, write the string constant with an E to be sure it will be handled the same way in future releases. In addition to standard_conforming_strings, the configuration parameters escape_string_warning and backslash_quote govern treatment of backslashes in string constants." Unfortunately, you can't start Akonadi back up later on then however. It seems that Akonadi is not detecting the created tables correctly. PostgreSQL automatically folds unquoted table/column identifiers to lowercase. So, SchemaVersionTable is actually created as schemaversiontable. If you want the table to be created with mixed case you have to use "SchemaVersionTable" in the CREATE TABLE command. http://www.postgresql.org/docs/9.0/static/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIERS "Quoting an identifier also makes it case-sensitive, whereas unquoted names are always folded to lower case. For example, the identifiers FOO, foo, and "foo" are considered the same by PostgreSQL, but "Foo" and "FOO" are different from these three and each other. (The folding of unquoted names to lower case in PostgreSQL is incompatible with the SQL standard, which says that unquoted names should be folded to upper case. Thus, foo should be equivalent to "FOO" not "foo" according to the standard. If you want to write portable applications you are advised to always quote a particular name or never quote it.)" Works as expected since ages. Note that the external DB usage is not supported and supposes that the server is configured correctly before starting Akonadi. Futher to what David said, I would to add that if 'standard_conforming_strings' doesn't fix it for you, then consider changing the type of the column from bytea to text e.g: ALTER TABLE flagTable ALTER COLUMN name TYPE text; This worked for me. Note to the Postgres backend users: Do not update Qt to 4.8.5. This release has a nasty regression that would prevent you from using Akonadi. Read the comments there for the details: https://bugreports.qt-project.org/browse/QTBUG-30076 If possible, delay your Qt update or try to downgrade to 4.8.4 if it's too late setting as upstream (Qt) bug no, the upstream bug appeared after this bug. Git commit 0a348cc98a458227bb28d89de584b61e31e1e9a8 by Dan Vrátil, on behalf of Cédric Villemain. Committed on 04/10/2013 at 12:07. Pushed by dvratil into branch '1.10'. Map QString to text instead of Bytea with PostgreSQL backend It's what suggested by QTSql. It also happens to fix the recent issues raising around '\SEEN' errors in SQL queries. It was visible because QTSql somewhat improve the postgresql driver, and so... akonadi revealed its own bug. REVIEW: 112976 Related: bug 322931 FIXED-IN: 1.10.3 M +0 -7 server/src/storage/dbinitializer_p.cpp M +14 -0 server/src/storage/dbupdate.xml http://commits.kde.org/akonadi/0a348cc98a458227bb28d89de584b61e31e1e9a8 |