Using Postgresql 10.19 with KMyMoney 5.08
Dave Kelly
dkellygb at gmail.com
Thu Jan 20 18:15:01 GMT 2022
Hi All,
I have just started using KMyMoney and I am really happy with it. The
only thing is, I would like to use it with Postgresql. Hopefully, the
database will enable both me and my wife to enter transactions at the
same time.
However, when I try to save the data out to Postgresql, I get errors.
The first method I used was File|Save as and select SQL and put in the
database parameters. It is a server on my local network. The error it
returns is:
Error in function int MyMoneyStorageSql::open(const QUrl&, int, bool) :
opening new database
Driver = QPSQL, Host = 192.168.0.8, User = dave, Database = KMyMoney
Driver Error: QPSQL: Unable to connect
Database Error No -1: connection to server at "192.168.0.8", port 5432
failed: FATAL: database "KMyMoney" does not exist
Text: connection to server at "192.168.0.8", port 5432 failed: FATAL:
database "KMyMoney" does not exist
QPSQL: Unable to connect
Error type 1
Executed:
Query error No -1:
Error type 0
When I take a look at the database server, a kmymoney database has been
created but there are no tables. I thought it had to do with the
capitalisation because the error message and default is mixed case.
So, I dropped the KMyMoney database in Postgresql and tried to save as
again specifying an all lowercase database name “money”. I get the
following error:
Cannot save to current database: Error in function void
MyMoneyStorageSqlPrivate::deleteKeyValuePairs(const QString&, const
QVariantList&) : deleting kvp for STORAGE
Driver = QPSQL, Host = 192.168.0.8, User = dave, Database = money
Driver Error:
Database Error No -1:
Text:
Error type 0
Executed: DELETE FROM kmmKeyValuePairs WHERE kvpType = ? AND kvpId = ?;
Query error No 42601: ERROR: syntax error at or near "("
LINE 1: EXECUTE ('STORAGE', '')
^
(42601) QPSQL: Unable to create query
Error type 2
/build/kmymoney-2XFvAS/kmymoney-5.0.8/kmymoney/plugins/sql/mymoneystoragesql_p.h:1927
This time, a series of tables starting with kmm are created despite the
error. So I decided to try and open it. First I get prompted to select a
currency so I tried GBP. As soon as I accept this dialog box, I get:
“Uncaught error. Please report the details to the developers”
Here are the details:
Unknown account id 'AStd::Asset'
/build/kmymoney-2XFvAS/kmymoney-5.0.8/kmymoney/mymoney/storage/mymoneystoragemgr.cpp:142
KMyMoney then closes.
Ok, I thought I would try
Tools|Generate database SQL and create the database by hand. Copied the
SQL and pasted into an SQL query and it ran successfully. Cool!
When I tried to open the database in KMyMoney, I get the currency prompt
again and there is no data. Do I need to Export from the xml version to
import into the Postgres version? I tried exporting one account but it
doesn’t make sense how to import it.
I am using version 5.0.8 from the repo on Linux Mint 20.2 Cinnamon. I am
using "PostgreSQL 10.19 (Ubuntu 10.19-0ubuntu0.18.04.1) on
x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 7.5.0-3ubuntu1~18.04)
7.5.0, 64-bit"
Thanks!!!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kmymoney/attachments/20220120/f95ae72a/attachment.htm>
More information about the KMyMoney
mailing list