Search Postgresql Archives

Arrays

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I would like to make a table of 20 plus columns the majority of columns being arrays.
 
The following test works. The array will hold up to five characteristics of each parameter including the unit of measurement used. Using traditional methods I would need six columns to accomplish the same end (Min, Max, Norm plus a unit column for each).
 
The downside is that the number of brackets required increases for each succeeding column for insert and update. The last column would comprise 48 brackets, 24 before - 24 after.
 
Is there a work-around for this.
 
Bob Pawley
 
create table specifications (
 fluid_id int4 ,
 Flow_Rate varchar array[5],
 Temperature varchar array[5],
 Pressure_In varchar array[5] ,
 Pressure_Out varchar array[5]
 );
 
 insert into specifications values ('1', '{25, 50, 100, gpm}', '{{100, 250, 500, DegF}}',
 '{{{10, 40, 100, psi}}}', '{{{{60, 120, 150, psi}}}}' );
 
 

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux