Re: Postgres Array Traversing Problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux