Howto determin the number of elemnts of an array

Ask a Question related to PostgreSQL / PGSQL, Design and Development.

  1. #1

    Default Howto determin the number of elemnts of an array

    Hi,
    how can I determin the number of elements of an array? I saw function
    array_dims() which returns a string value representing the dimensions of the
    array. Is there a function which returns only the number of elements as an
    integer.

    -- Csaba

    --
    No virus found in this outgoing message.
    Checked by AVG Anti-Virus.
    Version: 7.0.300 / Virus Database: 265.8.2 - Release Date: 2005.01.28.



    ---------------------------(end of broadcast)---------------------------
    TIP 3: if posting/reading through Usenet, please send an appropriate
    subscribe-nomail command to [email]majordomo@postgresql.org[/email] so that your
    message can get through to the mailing list cleanly

    Együd Csaba Guest

  2. Similar Questions and Discussions

    1. How to find the number of elements in an array
      Ack -- I wanted to post this to both this group and alt.php but forgot to include this group in the original posting -- sorry. Forgive me if this...
    2. howto put the same number 36 times in a list?
      From the manuals I understand that you make a list with 36 times same number: Is there some easy operation that does it 36 time for me like:...
    3. Number of elements in an array
      I hope the subject isn't too misleading... I am trying to find the number of elements of each "data" array in the following: -- use...
    4. Determin Version
      I have PhotoShop 7.0 and want Adobe Camera RAW plug-in which requires 7.0.1. I have checked for new updates within PhotoShop and am told there are...
    5. HowTo check if my String is a Number (Integer) ?
      You can try If IsNumeric(str) Then Convert.ToInt32(str) End If -- Craig Deelsnyder Microsoft MVP - ASP/ASP.NET
  3. #2

    Default Re: Howto determin the number of elemnts of an array



    Együd Csaba wrote:
    > Hi,
    > how can I determin the number of elements of an array? I saw function
    > array_dims() which returns a string value representing the dimensions of the
    > array. Is there a function which returns only the number of elements as an
    > integer.
    >
    > -- Csaba
    >
    array_upper(arrayname,dimension) will return the number of elements in
    the specified dimension of array arrayname.

    Sven


    ---------------------------(end of broadcast)---------------------------
    TIP 7: don't forget to increase your free space map settings

    Sven Willenberger Guest

  4. #3

    Default Re: Howto determin the number of elemnts of an array

    Hi Seven,
    it would be better for me if it returned the number of elements as an
    integer even if the array is empty (in this case it returns with NULL). No
    metter this is easily can be worked around, but it would have been more
    confortable.

    Thank you very much.
    -- Csaba Együd

    -----Original Message-----
    From: Sven Willenberger [mailto:sven@dmv.com]
    Sent: Monday, January 31, 2005 4:27 PM
    To: [email]pgsql-general@postgresql.org[/email]
    Cc: Együd Csaba
    Subject: Re: [GENERAL] Howto determin the number of elemnts of an array



    Együd Csaba wrote:
    > Hi,
    > how can I determin the number of elements of an array? I saw function
    > array_dims() which returns a string value representing the dimensions
    > of the array. Is there a function which returns only the number of
    > elements as an integer.
    >
    > -- Csaba
    >
    array_upper(arrayname,dimension) will return the number of elements in the
    specified dimension of array arrayname.

    Sven

    --
    No virus found in this outgoing message.
    Checked by AVG Anti-Virus.
    Version: 7.0.300 / Virus Database: 265.8.2 - Release Date: 2005.01.28.



    ---------------------------(end of broadcast)---------------------------
    TIP 3: if posting/reading through Usenet, please send an appropriate
    subscribe-nomail command to [email]majordomo@postgresql.org[/email] so that your
    message can get through to the mailing list cleanly

    Együd Csaba Guest

  5. #4

    Default Re: Howto determin the number of elemnts of an array

    Hi,
    this function is part of GiST which is not installed on my server. Should I
    install the whole GiST or there is a single package to implement only this
    feature?

    thank you,
    -- Csaba

    -----Original Message-----
    From: PFC [mailto:lists@boutiquenumerique.com]
    Sent: Monday, January 31, 2005 5:16 PM
    To: Együd Csaba; 'Sven Willenberger'; [email]pgsql-general@postgresql.org[/email]
    Subject: Re: [GENERAL] Howto determin the number of elemnts of an array


    icount( array )

    > Hi Seven,
    > it would be better for me if it returned the number of elements as an
    > integer even if the array is empty (in this case it returns with NULL).
    > No
    > metter this is easily can be worked around, but it would have been
    > more confortable.
    >
    > Thank you very much.
    > -- Csaba Együd
    >
    > -----Original Message-----
    > From: Sven Willenberger [mailto:sven@dmv.com]
    > Sent: Monday, January 31, 2005 4:27 PM
    > To: [email]pgsql-general@postgresql.org[/email]
    > Cc: Együd Csaba
    > Subject: Re: [GENERAL] Howto determin the number of elemnts of an
    > array
    >
    >
    >
    > Együd Csaba wrote:
    >> Hi,
    >> how can I determin the number of elements of an array? I saw function
    >> array_dims() which returns a string value representing the dimensions
    >> of the array. Is there a function which returns only the number of
    >> elements as an integer.
    >>
    >> -- Csaba
    >>
    >
    > array_upper(arrayname,dimension) will return the number of elements in
    > the specified dimension of array arrayname.
    >
    > Sven
    >

    --
    No virus found in this outgoing message.
    Checked by AVG Anti-Virus.
    Version: 7.0.300 / Virus Database: 265.8.2 - Release Date: 2005.01.28.



    ---------------------------(end of broadcast)---------------------------
    TIP 6: Have you searched our list archives?

    [url]http://archives.postgresql.org[/url]

    Együd Csaba Guest

  6. #5

    Default Re: Howto determin the number of elemnts of an array

    I really can't find such file in contrib dir. Nor files containing 'icount'
    pattern. Sorry.
    I use Pg8.0 final on windows XP.

    On the [url]http://www.sai.msu.su/~megera/postgres/gist/[/url] url I can find only a
    patch. Where can I download the whole package from?

    Thank you.

    -- Csaba

    -----Original Message-----
    From: PFC [mailto:lists@boutiquenumerique.com]
    Sent: Monday, January 31, 2005 8:48 PM
    To: Együd Csaba; 'Sven Willenberger'; [email]pgsql-general@postgresql.org[/email]
    Subject: Re: [GENERAL] Howto determin the number of elemnts of an array


    contrib/intarray

    On Mon, 31 Jan 2005 20:00:06 +0100, Együd Csaba <csegyud@vnet.hu> wrote:
    > Hi,
    > this function is part of GiST which is not installed on my server.
    > Should I
    > install the whole GiST or there is a single package to implement only
    > this feature?
    >
    > thank you,
    > -- Csaba
    >
    > -----Original Message-----
    > From: PFC [mailto:lists@boutiquenumerique.com]
    > Sent: Monday, January 31, 2005 5:16 PM
    > To: Együd Csaba; 'Sven Willenberger'; [email]pgsql-general@postgresql.org[/email]
    > Subject: Re: [GENERAL] Howto determin the number of elemnts of an
    > array
    >
    >
    > icount( array )
    >
    >
    >> Hi Seven,
    >> it would be better for me if it returned the number of elements as an
    >> integer even if the array is empty (in this case it returns with NULL).
    >> No
    >> metter this is easily can be worked around, but it would have been
    >> more confortable.
    >>
    >> Thank you very much.
    >> -- Csaba Együd
    >>
    >> -----Original Message-----
    >> From: Sven Willenberger [mailto:sven@dmv.com]
    >> Sent: Monday, January 31, 2005 4:27 PM
    >> To: [email]pgsql-general@postgresql.org[/email]
    >> Cc: Együd Csaba
    >> Subject: Re: [GENERAL] Howto determin the number of elemnts of an
    >> array
    >>
    >>
    >>
    >> Együd Csaba wrote:
    >>> Hi,
    >>> how can I determin the number of elements of an array? I saw
    >>> function
    >>> array_dims() which returns a string value representing the
    >>> dimensions of the array. Is there a function which returns only the
    >>> number of elements as an integer.
    >>>
    >>> -- Csaba
    >>>
    >>
    >> array_upper(arrayname,dimension) will return the number of elements
    >> in the specified dimension of array arrayname.
    >>
    >> Sven
    >>
    >
    >

    --
    No virus found in this outgoing message.
    Checked by AVG Anti-Virus.
    Version: 7.0.300 / Virus Database: 265.8.2 - Release Date: 2005.01.28.



    ---------------------------(end of broadcast)---------------------------
    TIP 5: Have you checked our extensive FAQ?

    [url]http://www.postgresql.org/docs/faq[/url]

    Együd Csaba Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139