sql backend failure when deleting an account
Dave Peticolas
dave@krondo.com
14 Nov 2001 23:53:53 -0800
--=-dEUShP09cCW4unI1md9z
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable
On Wed, 2001-11-14 at 20:06, Matthew Vanecek wrote:
> I'll give that a whirl. You don't have any
> documentation on the test-db.c, do you? any little
> notes about it? Sometimes that's easier than trying
> to divine the process flow from the code...
Nothing other than what's there. There basic
paradigm is: make a bunch of random, but valid,
gnucash data, save it to sql, load it back and
make sure it's the same, lather, rinse, repeat.
> I made a small change to kvp-sql.c in CPY_KVP(TYPE). I
> added the objtype in the following bit:
>=20
> p =3D stpcpy (p, "' as sessionGuid, datetime('NOW')
> as date_changed, " \
> "'d' as change, 'z' as objtype, *
> from gncKVPValue" TYPE " WHERE iguid=3D");\
>=20
>=20
> I picked 'z' as an arbitrary value--ideally it should
> come from the objtype of the object being removed. I
> hadn't quite figured out how to get that yet, but I'll
> read the code some more. Any hints would be
> appreciated, though...
I think the object type should be 'k' for kvp.
But check src/backend/postgres/kvp-sql.c to be
sure.
> think the sql backend would be more-or-less OK if that
> were implemented. Of course, I still need to find the
> best way to get the objtype field, to correctly note
> the type of transaction being deleted.
I think there are probably still some more issues
there, especially with escaping kvp data. You might
look at the diffs over the last month or so in the
postgres module.
> I noticed that the src/engine/sql directory is empty
> in the cvs head tree. Is all that stuff moved to the
> src/backend/postresql directory?
Yes.
dave
--=-dEUShP09cCW4unI1md9z
Content-Type: application/pgp-signature
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQA783SR5effKKCmfpIRAj68AJ9UsKYcMTnrR0v3upBg4vtDvWSaIACfbmdO
ZJtB3duaMHrF7cxLRkOn1I0=
=PoCx
-----END PGP SIGNATURE-----
--=-dEUShP09cCW4unI1md9z--