pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Dawid Kuroczko <qnex42@gmail.com>
To: yogesh <yogesh.arora.daffodil@gmail.com>
Cc: pgsql-admin@postgresql.org, pgsql-sql <pgsql-sql@postgresql.org>
Subject: Re: Postgres Array Traversing Problem
Date: Fri, 5 Oct 2007 10:55:44 +0200
Message-ID: <758d5e7f0710050155j49730d3cr8d007a50b689c825@mail.gmail.com> (raw)
In-Reply-To: <1191489967.494550.265430@y42g2000hsy.googlegroups.com>
References: <1191489967.494550.265430@y42g2000hsy.googlegroups.com>

On 10/4/07, yogesh <yogesh.arora.daffodil@gmail.com> 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



view thread (2+ messages)

Message-ID: <758d5e7f0710050155j49730d3cr8d007a50b689c825@mail.gmail.com>
Permalink:  ../758d5e7f0710050155j49730d3cr8d007a50b689c825@mail.gmail.com/
Also on:    postgresql.org/message-id/758d5e7f0710050155j49730d3cr8d007a50b689c825@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: qnex42@gmail.com, yogesh.arora.daffodil@gmail.com
  Subject: Re: Postgres Array Traversing Problem
  In-Reply-To: <758d5e7f0710050155j49730d3cr8d007a50b689c825@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox