summaryrefslogtreecommitdiff
path: root/contrib/intarray/sql
AgeCommit message (Collapse)Author
2016-11-29Test all contrib-created operator classes with amvalidate.Tom Lane
I'd supposed that people would do this manually when creating new operator classes, but the folly of that was exposed today. The tests seem fast enough that we can just apply them during the normal regression tests. contrib/isn fails the checks for lack of complete sets of cross-type operators. That's a nice-to-have policy rather than a functional requirement, so leave it as-is, but insert ORDER BY in the query to ensure consistent cross-platform output. Discussion: https://postgr.es/m/7076.1480446837@sss.pgh.pa.us
2015-07-21Add selectivity estimation functions for intarray operators.Heikki Linnakangas
Uriy Zhuravlev and Alexander Korotkov, reviewed by Jeff Janes, some cleanup by me.
2012-02-17Fix longstanding error in contrib/intarray's int[] & int[] operator.Tom Lane
The array intersection code would give wrong results if the first entry of the correct output array would be "1". (I think only this value could be at risk, since the previous word would always be a lower-bound entry with that fixed value.) Problem spotted by Julien Rouhaud, initial patch by Guillaume Lelarge, cosmetic improvements by me.
2011-02-14Convert contrib modules to use the extension facility.Tom Lane
This isn't fully tested as yet, in particular I'm not sure that the "foo--unpackaged--1.0.sql" scripts are OK. But it's time to get some buildfarm cycles on it. sepgsql is not converted to an extension, mainly because it seems to require a very nonstandard installation process. Dimitri Fontaine and Tom Lane
2007-09-14Remove ill-considered (not to mention undocumented) attempt to makeTom Lane
contrib/intarray's GIN opclass override the built-in default. Per bug #3048 and other complaints.
2006-09-10Rename contrib contains/contained-by operators to @> and <@, per discussion.Tom Lane
2006-05-03Make GIN opclass worked with intarray extensionsTeodor Sigaev
2003-07-24Error message editing in contrib (mostly by Joe Conway --- thanks Joe!)Tom Lane
2002-10-21SET autocommit no longer needed in /contrib because pg_regress.sh doesBruce Momjian
it automatically now on regression session startup.
2002-10-18Update /contrib for "autocommit TO 'on'".Bruce Momjian
Create objects in public schema. Make spacing/capitalization consistent. Remove transaction block use for object creation. Remove unneeded function GRANTs.
2002-08-10August 6, 2002Bruce Momjian
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
2001-09-23please apply attached patch to current CVS.Bruce Momjian
Changes: 1. Added support for boolean queries (indexable operator @@, looks like a @@ '1|(2&3)' 2. Some code cleanup and optimization Regards, Oleg
2001-08-21Restructure pg_opclass, pg_amop, and pg_amproc per previous discussions inTom Lane
pgsql-hackers. pg_opclass now has a row for each opclass supported by each index AM, not a row for each opclass name. This allows pg_opclass to show directly whether an AM supports an opclass, and furthermore makes it possible to store additional information about an opclass that might be AM-dependent. pg_opclass and pg_amop now store "lossy" and "haskeytype" information that we previously expected the user to remember to provide in CREATE INDEX commands. Lossiness is no longer an index-level property, but is associated with the use of a particular operator in a particular index opclass. Along the way, IndexSupportInitialize now uses the syscaches to retrieve pg_amop and pg_amproc entries. I find this reduces backend launch time by about ten percent, at the cost of a couple more special cases in catcache.c's IndexScanOK. Initial work by Oleg Bartunov and Teodor Sigaev, further hacking by Tom Lane. initdb forced.
2001-03-17Update contrib intarray to Jan 25 version.Bruce Momjian
2001-01-12commit Oleg and Teodor's RD-tree implementation ... this provides theMarc G. Fournier
regression tests for the GiST changes ... this should be integrated into the regular regression tests similar to Vadim's SPI contrib stuff ...