<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
<p><font face="Helvetica, Arial, sans-serif">Hi All, <br>
</font></p>
<p><font face="Helvetica, Arial, sans-serif">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.<br>
<br>
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:<br>
<br>
Error in function int MyMoneyStorageSql::open(const QUrl&,
int, bool) : opening new database<br>
Driver = QPSQL, Host = 192.168.0.8, User = dave, Database =
KMyMoney<br>
Driver Error: QPSQL: Unable to connect<br>
Database Error No -1: connection to server at "192.168.0.8",
port 5432 failed: FATAL: database "KMyMoney" does not exist<br>
<br>
Text: connection to server at "192.168.0.8", port 5432 failed:
FATAL: database "KMyMoney" does not exist<br>
QPSQL: Unable to connect<br>
Error type 1<br>
Executed:<br>
Query error No -1: <br>
Error type 0<br>
<br>
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.<br>
<br>
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:<br>
<br>
Cannot save to current database: Error in function void
MyMoneyStorageSqlPrivate::deleteKeyValuePairs(const
QString&, const QVariantList&) : deleting kvp for
STORAGE <br>
Driver = QPSQL, Host = 192.168.0.8, User = dave, Database =
money<br>
Driver Error:<br>
Database Error No -1:<br>
Text: <br>
Error type 0<br>
Executed: DELETE FROM kmmKeyValuePairs WHERE kvpType = ? AND
kvpId = ?;<br>
Query error No 42601: ERROR: syntax error at or near "("<br>
LINE 1: EXECUTE ('STORAGE', '')<br>
^<br>
(42601) QPSQL: Unable to create query<br>
Error type 2
/build/kmymoney-2XFvAS/kmymoney-5.0.8/kmymoney/plugins/sql/mymoneystoragesql_p.h:1927<br>
<br>
<br>
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:<br>
<br>
“Uncaught error. Please report the details to the developers”<br>
<br>
Here are the details:<br>
<br>
Unknown account id 'AStd::Asset'
/build/kmymoney-2XFvAS/kmymoney-5.0.8/kmymoney/mymoney/storage/mymoneystoragemgr.cpp:142<br>
<br>
KMyMoney then closes.<br>
<br>
Ok, I thought I would try <br>
<br>
Tools|Generate database SQL and create the database by hand.
Copied the SQL and pasted into an SQL query and it ran
successfully. Cool!<br>
<br>
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.<br>
<br>
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"<br>
<br>
Thanks!!! <br>
<br>
</font><br>
</p>
</body>
</html>