Re: [GENERAL] Craeteing sparse arrays

2009-10-15 Thread Scott Bailey
Peter Hunsberger writes: Is there any easy way to create sparse arrays with Postres? Have you tried it? regression=# create table foo (bar text[]); CREATE TABLE regression=# insert into foo (bar[3],bar[7]) values ( 'a', 'b'); INSERT 0 1 regression=# select * from foo; bar

Re: [GENERAL] Craeteing sparse arrays

2009-10-15 Thread Tom Lane
Peter Hunsberger writes: > Is there any easy way to create sparse arrays with Postres? Have you tried it? regression=# create table foo (bar text[]); CREATE TABLE regression=# insert into foo (bar[3],bar[7]) values ( 'a', 'b'); INSERT 0 1 regression=# select * from foo; bar

[GENERAL] Craeteing sparse arrays

2009-10-15 Thread Peter Hunsberger
Is there any easy way to create sparse arrays with Postres? Specifically, when I construct, add or aggregate data to an array, I want to be able to specify the position within the array where the data is placed and have any intervening positions that have not yet been populated just marked as nulls