postgresql/contrib/array
Bruce Momjian 92e100dd33 Here is a patch that removes contrib/array, leaving only the README with
some examples of the new syntax and a reference to the documentation.

Joe Conway.
2003-09-11 17:15:27 +00:00
..
README.array_iterator Here is a patch that removes contrib/array, leaving only the README with 2003-09-11 17:15:27 +00:00

README.array_iterator

Array iterator functions have been removed as of PostgreSQL 7.4, because
equivalent functionality is now available built in to the backend.

For example, previously, using contrib/array, you might have used the
following construct:

    create table t(id int4[], txt text[]);

    -- select tuples with some id element equal to 123
    select * from t where t.id *= 123;

Now you would do this instead:

    -- select tuples with some id element equal to 123
    select * from t where 123 = any (t.id);

    -- or you could also do this
    select * from t where 123 = some (t.id);

Similarly, if using contrib/array, you did the following:

    -- select tuples with all txt elements matching '^[A-Z]'
    select * from t where t.txt[1:3] **~ '^[A-Z]';

Now do this instead:

    -- select tuples with all txt elements matching '^[A-Z]'
    select * from t where '^[A-Z]' ~ all (t.txt[1:3]);

See the related section in the online documentation for more detail:
    Table of Contents => Functions and Operators => Row and Array Comparisons