1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-26 01:22:12 +03:00
Files
config
contrib
adddepend
array
README.array_iterator
btree_gist
chkpass
cube
dbase
dblink
dbmirror
dbsize
earthdistance
findoidjoins
fulltextindex
fuzzystrmatch
intagg
intarray
ipc_check
isbn_issn
lo
ltree
mSQL-interface
mac
miscutil
mysql
noupdate
oid2name
oracle
pg_autovacuum
pg_dumplo
pg_logger
pg_upgrade
pgbench
pgcrypto
pgstattuple
reindexdb
rserv
rtree_gist
seg
spi
start-scripts
string
tablefunc
tips
tools
tsearch
tsearch2
userlock
vacuumlo
xml
Makefile
README
contrib-global.mk
doc
src
COPYRIGHT
GNUmakefile.in
HISTORY
INSTALL
Makefile
README
aclocal.m4
configure
configure.in
postgres/contrib/array/README.array_iterator
2003-09-13 17:33:46 +00:00

32 lines
1.0 KiB
Plaintext

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 this section in the PostgreSQL documentation for more detail:
The SQL Language => Functions and Operators => Row and Array Comparisons