Re: [SQL] can someone explain confusing array indexing nomenclature

2007-02-24 Thread chrisj
I guess you could say the [2] is discarded since the value "2" is at the top or beyond the top of the range. Achilleas Mantzios wrote: > > Στις Παρασκευή 16 Φεβρουάριος 2007 20:35, ο/η chrisj έγραψε: >> I am quite sure the [2] is not discarded, easy enough to test but I don't >> have access to P

Re: [SQL] can someone explain confusing array indexing nomenclature

2007-02-20 Thread Bruce Momjian
Yes, it is confusing. I have an update to the array documentation that should clarify it --- attached. --- Achilleas Mantzios wrote: > ? 16 ??? 2007 20:35, ?/? chrisj ??: > > I am quite sure the [2]

Re: [SQL] can someone explain confusing array indexing nomenclature

2007-02-19 Thread Achilleas Mantzios
Στις Παρασκευή 16 Φεβρουάριος 2007 20:35, ο/η chrisj έγραψε: > I am quite sure the [2] is not discarded, easy enough to test but I don't > have access to PG at the moment. Well it should, since dynacom=# SELECT (CAST( '{{meeting,lunch},{training,presentation}}' as text[][]))[1:1]; text --

Re: [SQL] can someone explain confusing array indexing nomenclature

2007-02-16 Thread chrisj
I am quite sure the [2] is not discarded, easy enough to test but I don't have access to PG at the moment. Achilleas Mantzios wrote: > > Στις Πέμπτη 15 Φεβρουάριος 2007 18:55, ο/η chrisj έγραψε: >> Thanks Achilleas, >> >> I see what you are saying, but if we consider just the index "[2]" for a

Re: [SQL] can someone explain confusing array indexing nomenclature

2007-02-16 Thread Achilleas Mantzios
Στις Πέμπτη 15 Φεβρουάριος 2007 18:55, ο/η chrisj έγραψε: > Thanks Achilleas, > > I see what you are saying, but if we consider just the index "[2]" for a > moment, > it means something different depending upon the context (in one case it > means "2" and in the other case it means "1:2") and the c

Re: [SQL] can someone explain confusing array indexing nomenclature

2007-02-15 Thread chrisj
Thanks Achilleas, I see what you are saying, but if we consider just the index "[2]" for a moment, it means something different depending upon the context (in one case it means "2" and in the other case it means "1:2") and the context is determined by the format of indexes on other dimensions.

Re: [SQL] can someone explain confusing array indexing nomenclature

2007-02-15 Thread Achilleas Mantzios
Στις Τετάρτη 14 Φεβρουάριος 2007 21:31, ο/η chrisj έγραψε: > given the following table: > > protocal2=> select * from sal_emp ; > name | pay_by_quarter | schedule > ---+---+--- > Bill | {1,1,10

[SQL] can someone explain confusing array indexing nomenclature

2007-02-14 Thread chrisj
given the following table: protocal2=> select * from sal_emp ; name | pay_by_quarter | schedule ---+---+--- Bill | {1,1,1,1} | {{meeting,lunch},{training,presentation}} Carol | {200