>>>>> On Fri, 10 May 2024 12:15:07 -0400, Phil Stracchino said:
> 
> On 5/10/24 07:40, Martin Simmons wrote:
> >>>>>> On Thu, 9 May 2024 14:45:31 -0400, Phil Stracchino said:
> >> It is an INT UNSIGNED NOT NULL (with no DEFAULT specified) in FileMedia,
> >> but it is a signed INT(11) in every other table where it exists.  It is
> >> inconsistently allowed to be NULL, has a DEFAULT specified in BaseFiles
> >> but is allowed to be NULL there, is NOT NULL DEFAULT 0 in Object but
> >> NULL DEFAULT 0 in RestoreObject, ...
> >>
> >>
> >> Is this column *SUPPOSED* to be INT UNSIGNED NOT NULL DEFAULT 0 wherever
> >> it exists?
> > 
> > No, FileIndex is signed in the File table at least (-ve is used to mark
> > deleted files in an accurate backup).
> 
> Then should it not be signed *everywhere*?  Or are these just a group of 
> disparate columns not used outside their tables that just HAPPEN to all 
> have the same name?

Even if the columns represent the same thing when they are non-negative, it is
still possible that negative values should never be inserted into FileMedia
for some logical reason in the code.  That's more like a constraint though.

> And should it be allowed to be NULLable?

Not for File AFAIK (and it is declared not null on PostgreSQL), but I don't
know about the others.

__Martin


_______________________________________________
Bacula-devel mailing list
Bacula-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-devel

Reply via email to