Received: from localhost (unknown [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id AFAC49FB894 for ; Fri, 5 Oct 2007 05:55:59 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 85148-03 for ; Fri, 5 Oct 2007 05:55:51 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from fk-out-0910.google.com (fk-out-0910.google.com [209.85.128.186]) by postgresql.org (Postfix) with ESMTP id 9ADB39FB413 for ; Fri, 5 Oct 2007 05:55:51 -0300 (ADT) Received: by fk-out-0910.google.com with SMTP id b27so436311fka for ; Fri, 05 Oct 2007 01:55:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=EM7xsdXXRreL4mx2MF8Uf6JOLLlbyCB/4GmNwA2Qkhw=; b=aBc2Rl+sQhSg/qOPHVRe8bwTW9Kep81jGoOLVKTNlLV1NMvrqU09Qx2EGao8A6CgZltYyMQ3gY43xMAN7mKN4TZYh3TlPDc9C5AOsAA+equJdGdgXfctON92wgLlAkmIXXFtEwxy/ol+BoOqzeZC88JjGiW8mR9zGYennwisXxM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=TegoiewSy+cLy6gMn/36wsB8jGXSAH6ugfY1IuymYYx+9dwzQu/zEs7BBAj8mg05k3wnNnEooy6oUEAE0vDDJVyyL3/lByJYrxrk8O8r28lf7oXnoCxx1APHgbLgwb4BLBH2pls3k+2Y070UE312GvrEQ3+QXlZ1VilYvR33Lhw= Received: by 10.82.183.19 with SMTP id g19mr3647206buf.1191574545793; Fri, 05 Oct 2007 01:55:45 -0700 (PDT) Received: by 10.82.170.9 with HTTP; Fri, 5 Oct 2007 01:55:44 -0700 (PDT) Message-ID: <758d5e7f0710050155j49730d3cr8d007a50b689c825@mail.gmail.com> Date: Fri, 5 Oct 2007 10:55:44 +0200 From: "Dawid Kuroczko" To: yogesh Subject: Re: Postgres Array Traversing Problem Cc: pgsql-admin@postgresql.org, pgsql-sql In-Reply-To: <1191489967.494550.265430@y42g2000hsy.googlegroups.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <1191489967.494550.265430@y42g2000hsy.googlegroups.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200710/24 X-Sequence-Number: 26938 On 10/4/07, yogesh wrote: > Hello Friends, > > I have a Problem in Accessing Arrays in the Postgres. > The Description of my problem is given > here:----------------------- > I have two array of numeric types. One That stores the IDs and Other > Store their values at respective position. > One Id could be in more than one Row's Array. Now i have to search > the ID if it is present in the Array or not. Any specific reason why you use arrays instead of normalizing your schema? > If present then at what position and to retrieve the corresponding > ID and its Value....present in the other table...... > Is there any solution of it................If any Body knows please > reply me as soon as possible....... You should use pgsql-sql@postgresql.org list for this type of questions. The safest route would be to use PL/pgSQL procedure which iterates the array elements. It should be quite simple. Play with this. Regards, Dawid