Skip to content
Snippets Groups Projects
Select Git revision
  • benchmark-tools
  • postgres-lambda
  • master default
  • REL9_4_25
  • REL9_5_20
  • REL9_6_16
  • REL_10_11
  • REL_11_6
  • REL_12_1
  • REL_12_0
  • REL_12_RC1
  • REL_12_BETA4
  • REL9_4_24
  • REL9_5_19
  • REL9_6_15
  • REL_10_10
  • REL_11_5
  • REL_12_BETA3
  • REL9_4_23
  • REL9_5_18
  • REL9_6_14
  • REL_10_9
  • REL_11_4
23 results

README.intarray

  • Bruce Momjian's avatar
    181ca96e
    August 6, 2002 · 181ca96e
    Bruce Momjian authored
       1. Reworked patch from Andrey Oktyabrski (ano@spider.ru) with
          functions: icount, sort, sort_asc, uniq, idx, subarray
          operations: #, +, -, |, &
    
    FUNCTIONS:
    
      int   icount(int[]) - the number of elements in intarray
      int[] sort(int[], 'asc' | 'desc') - sort intarray
      int[] sort(int[]) - sort in ascending order
      int[] sort_asc(int[]),sort_desc(int[]) - shortcuts for sort
      int[] uniq(int[]) - returns unique elements
      int   idx(int[], int item) - returns index of first intarray matching element
                                   to item, or '0' if matching failed.
      int[] subarray(int[],int START [, int LEN]) - returns part of intarray
                                   starting from element number START (from 1)
                                   and length LEN.
    OPERATIONS:
    
      int[] && int[]  - overlap - returns TRUE if arrays has at least one common elements.
      int[] @  int[]  - contains - returns TRUE if left array contains right array
      int[] ~ int[]   - contained - returns TRUE if left array is contained in right array
      # int[]         - return the number of elements in array
      int[] + int     - push element to array ( add to end of array)
      int[] + int[]   - merge of arrays (right array added to the end of left one)
      int[] - int     - remove entries matched by right argument from array
      int[] - int[]   - remove left array from right
      int[] | int     - returns intarray - union of arguments
      int[] | int[]   - returns intarray as a union of two arrays
      int[] & int[]   - returns intersection of arrays
    
    Oleg Bartunov
    181ca96e
    History
    August 6, 2002
    Bruce Momjian authored
       1. Reworked patch from Andrey Oktyabrski (ano@spider.ru) with
          functions: icount, sort, sort_asc, uniq, idx, subarray
          operations: #, +, -, |, &
    
    FUNCTIONS:
    
      int   icount(int[]) - the number of elements in intarray
      int[] sort(int[], 'asc' | 'desc') - sort intarray
      int[] sort(int[]) - sort in ascending order
      int[] sort_asc(int[]),sort_desc(int[]) - shortcuts for sort
      int[] uniq(int[]) - returns unique elements
      int   idx(int[], int item) - returns index of first intarray matching element
                                   to item, or '0' if matching failed.
      int[] subarray(int[],int START [, int LEN]) - returns part of intarray
                                   starting from element number START (from 1)
                                   and length LEN.
    OPERATIONS:
    
      int[] && int[]  - overlap - returns TRUE if arrays has at least one common elements.
      int[] @  int[]  - contains - returns TRUE if left array contains right array
      int[] ~ int[]   - contained - returns TRUE if left array is contained in right array
      # int[]         - return the number of elements in array
      int[] + int     - push element to array ( add to end of array)
      int[] + int[]   - merge of arrays (right array added to the end of left one)
      int[] - int     - remove entries matched by right argument from array
      int[] - int[]   - remove left array from right
      int[] | int     - returns intarray - union of arguments
      int[] | int[]   - returns intarray as a union of two arrays
      int[] & int[]   - returns intersection of arrays
    
    Oleg Bartunov