Arrays

Поиск
Список
Период
Сортировка
От Bob Pawley
Тема Arrays
Дата
Msg-id 00c301c622a4$78df7850$ac1d4318@owner
обсуждение исходный текст
Ответы Re: Arrays  (Karsten Hilbert <Karsten.Hilbert@gmx.net>)
Re: Arrays  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: Seneca Cunningham
Дата:
Сообщение: Re: Encoding errors when upgrading from 7.4 to 8.1
Следующее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: Access Problem After Version Upgrade -- FIXED