Installing GNU Cash with PostGreSQL

Anders Johansson anders_skane at yahoo.com
Tue Jul 14 09:18:46 EDT 2009


Thanks for the instructions.  I was able to get to the dialog to save as a PostGreSQL database file.  Now I have to get PostGreSQL configured so I can use it.
 
Regards,
Anders

--- On Thu, 7/9/09, Phil Longstaff <plongstaff at rogers.com> wrote:


From: Phil Longstaff <plongstaff at rogers.com>
Subject: Re: Installing GNU Cash with PostGreSQL
To: gnucash-devel at gnucash.org
Cc: "Anders Johansson" <anders_skane at yahoo.com>, gnucash-devel at lists.gnucash.org
Date: Thursday, July 9, 2009, 9:04 PM



#yiv1025127545 p, #yiv1025127545 li {white-space:pre-wrap;}
On July 9, 2009 08:24:57 pm Anders Johansson wrote:
> How do I install GNU Cash to use PostGreSQL as the backend?  I am running
> Win XP Pro, service pack 3.  I currently have GNU Cash 2.2.9 and willing to
> experiment with 2.3.2, but would like to try it using the PostGreSQL
> backend.
>
> Thanks,
> Anders


The 2.3.2 win32 setup .exe is on sourceforge. Download it and install it. It should contain everything required to access a postgresql db.


The File -> Open and Save As menu entries are changed. In the past, they were simple file dialog boxes. Now, they are new dialog boxes. In the top left corner is a combo box indicating what type of file or connection to use. For Open, default is "file", other entries are "mysql" or "pgsql". For Save As, default is "sqlite3", other entries are "xml", "mysql" or "pgsql". If the setting is "file", "sqlite3" or "xml", the top right portion of the dialog will be disabled and the bottom section will be enabled. This section is a standard file access dialog. If the setting is "mysql" or "pgsql", the bottom section is disabled and the top right section is enabled. This section contains 4 text entry fields where you can enter hostname, db name, username and password.


Once you have your postgresql server setup, start gnucash. Open your existing gnucash file. Use Save As, switch to "pgsql", then enter hostname, dbname, username and password. The username must be for a user with authorization to create a database if it doesn't already exist.


With postgresql, you might get a popup dialog telling you that the db has contents which will be overwritten, even though this is a newly created db. This is a bug. Just press OK.


Good luck. After this, there should be very little difference, other than the fact that all changes (e.g. new transactions) are saved automatically, so you do not need to save on exit.


Phil


      


More information about the gnucash-devel mailing list