X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (neptune.hub.org [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 4464CD1EA82 for ; Wed, 21 Jan 2004 17:15:32 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 87886-05 for ; Wed, 21 Jan 2004 13:15:01 -0400 (AST) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by svr1.postgresql.org (Postfix) with ESMTP id E0212D1E9C0 for ; Wed, 21 Jan 2004 13:14:33 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.10/8.12.10) with ESMTP id i0LHEUpH001649; Wed, 21 Jan 2004 12:14:30 -0500 (EST) To: Rajesh Kumar Mallah Cc: pgsql-sql@postgresql.org, Joe Conway Subject: Re: array_lower /array_prepend doubt In-reply-to: <400E85EC.4000106@trade-india.com> References: <400E85EC.4000106@trade-india.com> Comments: In-reply-to Rajesh Kumar Mallah message dated "Wed, 21 Jan 2004 19:30:12 +0530" Date: Wed, 21 Jan 2004 12:14:30 -0500 Message-ID: <1648.1074705270@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200401/196 X-Sequence-Number: 16589 Rajesh Kumar Mallah writes: > can anyone explain why > SELECT array_lower(array_prepend(0, ARRAY[1,2,3]), 1); > returns 0 not 1 Because array_prepend keeps the subscripts of the existing array elements the same. This was discussed during development of the code, but I don't see anything in the documentation that mentions it. regards, tom lane