Missing gncGUIDCache table in PG Backend
Linas Vepstas
linas at linas.org
Thu Aug 14 19:13:44 CDT 2003
On Thu, Aug 14, 2003 at 01:43:37AM -0400, Christopher Browne was heard to remark:
> Linas wrote:
> > On Wed, Aug 13, 2003 at 09:39:05PM -0500, Matthew Vanecek was heard to remark
> > > Well, specifically the book table upgrade was failing due to (I believe)
> > > Postgres becoming a little more ANSI-SQL compliant (that's not a theme
> > > or anything for me, is it!?). NOT NULL constraints are not allowed on
> > > the ADD COLUMN statement in SQL, and thus not in Postgresql (anymore).
> >
> > OK. But I cannot begin to imagine why anyone would remove a harmless
> > feature that doesn't actually break compliance.
>
> According to the documentation:
>
> "A new column cannot have a not-null constraint since the column initially has
> to contain null values."
>
> Which seems to make sense.
>
> At the time you add the column, it's empty, isn't it?
>
> That breaks the constraint at the instant that it was applied, which means
> that the constraint system has to be broken.
Well, there's two ways to interpret the meaning.
You suggest 'constraint: never let the data in the column be null'
The alternative is
'never allow an INSERT/UPDATE that would leave the column null.'
Being a proceedural rather than a constraint kind-of guy, I went
with the latter.
It seems like one is throwing out the baby with the bathwater but hey
I've sat on standards committes before so I know ...
--linas
--
pub 1024D/01045933 2001-02-01 Linas Vepstas (Labas!) <linas at linas.org>
PGP Key fingerprint = 8305 2521 6000 0B5E 8984 3F54 64A9 9A82 0104 5933
More information about the gnucash-devel
mailing list