[pmg-devel] [PATCH pmg-api v2 04/10] add rule attributes and/invert (for each relevant type)

Thomas Lamprecht t.lamprecht at proxmox.com
Thu Feb 22 08:38:16 CET 2024


Am 22/02/2024 um 08:34 schrieb Dominik Csapak:
> 
> 
> On 2/22/24 07:46, Thomas Lamprecht wrote:
>> Am 21/02/2024 um 13:24 schrieb Dominik Csapak:
>>> +my $rule_attributes_cmd = <<__EOD;
>>> +    CREATE TABLE Rule_Attributes (
>>> +      Rule_ID INTEGER NOT NULL,
>>> +      Name VARCHAR(20) NOT NULL,
>>> +      Value BYTEA NULL,
>>
>> FWIW, with this being such limited to only support a boolean value, the
>> name could have been a boolean type for invert/and too..
>>
>> Else it would make more sense to have this either more generic, or make
>> it a very explicit table (name) like "Rule_Flags".
>>
>> As of now the name suggests that its generic, but the schema really isn't.
>> I.e., this feels a bit like the worst of both worlds.
>>
> 
> huh? i'm not sure i understand completely what you want to say:
> 
> Value is a BYTEA is a 'binary string' [0]
> so we can store arbitrary information there, not only booleans

Hmm OK, seems I misread the BYTEA definition yesterday evening and didn't
recheck today, ack then – sorry for the noise.




More information about the pmg-devel mailing list