Postgres chagnes
Matthew Vanecek
mevanecek at yahoo.com
Mon Aug 11 22:20:11 CDT 2003
Well, never mind, you've already patched it. However, you need to put
the transaction code back in, and restore PostgresBackend.c to how I had
it. Otherwise, the time zone upgrade is broken.
On Mon, 2003-08-11 at 20:27, Linas Vepstas wrote:
> Hi,
>
> I noticed that the postgres backend changed recently, and thought
> to take a quick look. I spotted one obvious bug immediately:
>
> Index: PostgresBackend.c
> ===================================================================
> RCS file: /home/cvs/cvsroot/gnucash/src/backend/postgres/PostgresBackend.c,v
> retrieving revision 1.48
> retrieving revision 1.49
> diff -u -p -r1.48 -r1.49
> --- PostgresBackend.c 27 Jul 2003 19:20:00 -0000 1.48
> +++ PostgresBackend.c 10 Aug 2003 20:24:24 -0000 1.49
> @@ -2204,10 +2204,10 @@ pgend_session_begin (QofBackend *backend
> qof_backend_set_error (&be->be, ERR_SQL_DB_BUSY);
> return;
> }
> - pgendUpgradeDB (be);
> p = "COMMIT;\n";
> SEND_QUERY (be,p, );
> FINISH_QUERY(be->connection);
> + pgendUpgradeDB (be);
> }
> else
> {
>
> Whoever did this cleary didn't look at what pgendUpgradeDB (be);
> does: its a routine that automatically and transparently makes
> the postgres backend upwards compatible with older versions ...
>
> Also, *EVERY* change to upgrade.c is fundamentally incorrect !!
> I REALLY WANT TO TYPE THE FOLLOWING IN CAPTIAL LETTERS:
>
> You cannot change gncEntry to gncSplit in put_iguid_in_tables()
> (for example), because databases on which this routine would run
> do not have tables which have column names called gncSplit!
>
> Making such changes misses the entire point of this file !
> This file is supposed to convert *old* databases, that have
> (for example) old/obsolete column names, to new databases,
> having new/renamed columns!
>
> In this particular case, it needs a new routine that will
> CREATE TABLE gncSplit, and then INSERT INTO gncSplit SELECT * FROM gncEntry;
> so as to copy from the old table name to the new table name!
> So I'm reverting these changes right now ...
>
> =========================================================
> I'm auditing the changes right now. I am hoping that the above is the
> only thing wrong that I find ...
>
> --linas
--
Matthew Vanecek
perl -e 'print $i=pack(c5,(41*2),sqrt(7056),(unpack(c,H)-2),oct(115),10);'
********************************************************************************
For 93 million miles, there is nothing between the sun and my shadow except me.
I'm always getting in the way of something...
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : /pipermail/attachments/20030811/d4b39fd6/attachment.bin
More information about the gnucash-devel
mailing list