Updated DDL for SQL backend
Jim C. Nasby
decibel at decibel.org
Fri Oct 27 01:07:00 EDT 2006
On Thu, Oct 26, 2006 at 11:58:22PM -0400, Derek Atkins wrote:
> Quoting Benoit Gregoire <bock at step.polymtl.ca>:
>
> > On Thursday 26 October 2006 22:43, Phil Longstaff wrote:
> >> 3) All object ids are (or should be) GUIDs. A GUID is represented by a
> >> set of 4 int fields. I use this instead of varbinary because it isn't
> >> variable length. I don't use any text type because I don't want any
> >> issues with 0x00 as a char in a GUID.
> >
> > Fair enough, it's fixed length. But it will make for really ugly SQL for
> > JOINS, with the only benefit of saving four bytes. I think using a varbinary
> > is much preferable (and just as portable).
>
> Or a varchar(32) and the hexstring... Just as portable and actually
> human-readable (and human-enterable). Not that I'm biased or anything
> ;)
Actually, at least in PostgreSQL, bytea is human readable when you
select on it:
decibel=# create table b(b bytea);
CREATE TABLE
decibel=# insert into b values('01234456789ABCDEF');
INSERT 0 1
decibel=# select * from b;
b
-------------------
01234456789ABCDEF
(1 row)
decibel=#
--
Jim C. Nasby, Database Architect decibel at decibel.org
Give your computer some brain candy! www.distributed.net Team #1828
Windows: "Where do you want to go today?"
Linux: "Where do you want to go tomorrow?"
FreeBSD: "Are you guys coming, or what?"
More information about the gnucash-devel
mailing list