I want to store a table for variables with table definition like below
variable
--------
id int
var_type int 0: number, 1: string, 2: json
var_name int
var_value ??? varchar or jsonb?
If I use varchar, how to store the json type variable and if, I am using jsonb how to store the int and string?
The example json value that is stored,
[{"name": "Andy", "email" : "[email protected]"},{"name": "Cindy", "email" : "[email protected]"}]
TIA
Beny
nameand anemailcolumn with appropriate types each?