Missing gncGUIDCache table in PG Backend

Christopher Browne gnucash at cbbrowne.com
Thu Aug 14 02:43:37 CDT 2003


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.

There is a way that the constraint could become permissible; if the column had 
a default value (not yet supported), then at the instant the column is added, 
the field could be filled in with some non-null value, thus allowing a "NOT 
NULL" constraint to also be applied.

(Mind you, I shudder a little at the thought of doing this to a big table; 
this action would mean having to rewrite the entire table...)
--
If this was helpful, <http://svcs.affero.net/rm.php?r=cbbrowne> rate me
http://www.ntlug.org/~cbbrowne/spiritual.html
"The  surest  sign  that  intelligent  life exists  elsewhere  in  the
universe is that it has never tried to contact us."
-- Calvin and Hobbes




More information about the gnucash-devel mailing list