Arrays - Mailing list pgsql-general

From Bob Pawley
Subject Arrays
Date
Msg-id 00c301c622a4$78df7850$ac1d4318@owner
Whole thread Raw
Responses Re: Arrays  (Karsten Hilbert <Karsten.Hilbert@gmx.net>)
Re: Arrays  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
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}}}}' );
 
 

pgsql-general by date:

Previous
From: Seneca Cunningham
Date:
Subject: Re: Encoding errors when upgrading from 7.4 to 8.1
Next
From: "Joshua D. Drake"
Date:
Subject: Re: Access Problem After Version Upgrade -- FIXED