- Feb 08, 2013
-
-
Tom Lane authored
The previous coding supposed that the first differing bytes in two varlena datums must have the same sign difference as their overall comparison result. This is obviously bogus for text strings in non-C locales, and probably wrong for numeric, and even for bytea I think it was wrong on machines where char is signed. When the assumption failed, the function could deliver a zero or negative penalty in situations where such a result is quite ridiculous, leading the core GiST code to make very bad page-split decisions. To fix, take the absolute values of the byte-level differences. Also, switch the code to using unsigned char not just char, so that the behavior will be consistent whether char is signed or not. Per investigation of a trouble report from Tomas Vondra. Back-patch to all supported branches.
-
Tom Lane authored
gbt_var_bin_union() failed to do the right thing when the existing range needed to be widened at both ends rather than just one end. This could result in an invalid index in which keys that are present would not be found by searches, because the searches would not think they need to descend to the relevant leaf pages. This error affected all the varlena datatypes supported by btree_gist (text, bytea, bit, numeric). Per investigation of a trouble report from Tomas Vondra. (There is also an issue in gbt_var_penalty(), but that should only result in inefficiency not wrong answers. I'm committing this separately so that we have a git state in which it can be tested that bad penalty results don't produce invalid indexes.) Back-patch to all supported branches.
-
- Aug 27, 2011
-
-
Bruce Momjian authored
remove from local *.h files. Per suggestion from Alvaro.
-
- Apr 23, 2011
-
-
Tom Lane authored
Make use of the collation attached to the index column, instead of hard-wiring DEFAULT_COLLATION_OID. (Note: in theory this could require reindexing btree_gist indexes on textual columns, but I rather doubt anyone has one with a non-default declared collation as yet.)
-
- Apr 10, 2011
-
-
Bruce Momjian authored
-
- Feb 08, 2011
-
-
Peter Eisentraut authored
This adds collation support for columns and domains, a COLLATE clause to override it per expression, and B-tree index support. Peter Eisentraut reviewed by Pavel Stehule, Itagaki Takahiro, Robert Haas, Noah Misch
-
- Sep 20, 2010
-
-
Magnus Hagander authored
-
- Aug 02, 2010
-
-
Robert Haas authored
Jeff Davis, with slight editorialization by me.
-
- Feb 26, 2010
-
-
Bruce Momjian authored
-
- Dec 02, 2009
-
-
Teodor Sigaev authored
optimization, so don't backpatch.
-
- Jun 11, 2009
-
-
Bruce Momjian authored
provided by Andrew.
-
- Jun 19, 2008
-
-
Alvaro Herrera authored
corresponding struct definitions. This allows other headers to avoid including certain highly-loaded headers such as rel.h and relscan.h, instead using just relcache.h, heapam.h or genam.h, which are more lightweight and thus cause less unnecessary dependencies.
-
- May 17, 2008
-
-
Andrew Dunstan authored
This particular batch was just for *.c and *.h file. The changes were made with the following 2 commands: find . \( \( -name 'libstemmer' -o -name 'expected' -o -name 'ppport.h' \) -prune \) -o \( -name '*.[ch]' \) \( -exec grep -q '\$PostgreSQL' {} \; -o -print \) | while read file ; do head -n 1 < $file | grep -q '^/\*' && echo $file; done | xargs -l sed -i -e '1s/^\// /' -e '1i/*\n * $PostgreSQL:$ \n *' find . \( \( -name 'libstemmer' -o -name 'expected' -o -name 'ppport.h' \) -prune \) -o \( -name '*.[ch]' \) \( -exec grep -q '\$PostgreSQL' {} \; -o -print \) | xargs -l sed -i -e '1i/*\n * $PostgreSQL:$ \n */'
-
- Feb 28, 2007
-
-
Tom Lane authored
Get rid of VARATT_SIZE and VARATT_DATA, which were simply redundant with VARSIZE and VARDATA, and as a consequence almost no code was using the longer names. Rename the length fields of struct varlena and various derived structures to catch anyplace that was accessing them directly; and clean up various places so caught. In itself this patch doesn't change any behavior at all, but it is necessary infrastructure if we hope to play any games with the representation of varlena headers. Greg Stark and Tom Lane
-
- Oct 05, 2006
-
-
Tom Lane authored
static variables. This avoids any risk of potential non-reentrancy, and in particular offers a much cleaner workaround for the Intel compiler bug that was affecting ginutil.c.
-
- Jul 14, 2006
-
-
Tom Lane authored
have no other gods before c.h'. Also remove some demonstrably redundant #include lines, mostly of <errno.h> which was added to c.h years ago.
-
Bruce Momjian authored
-
- Jul 13, 2006
-
-
Bruce Momjian authored
-
- Jul 11, 2006
-
-
Bruce Momjian authored
-
- Jun 28, 2006
-
-
Teodor Sigaev authored
* new split algorithm (as proposed in http://archives.postgresql.org/pgsql-hackers/2006-06/msg00254.php) * possible call pickSplit() for second and below columns * add spl_(l|r)datum_exists to GIST_SPLITVEC - pickSplit should check its values to use already defined spl_(l|r)datum for splitting. pickSplit should set spl_(l|r)datum_exists to 'false' (if they was 'true') to signal to caller about using spl_(l|r)datum. * support for old pickSplit(): not very optimal but correct split * remove 'bytes' field from GISTENTRY: in any case size of value is defined by it's type. * split GIST_SPLITVEC to two structures: one for using in picksplit and second - for internal use. * some code refactoring * support of subsplit to rtree opclasses TODO: add support of subsplit to contrib modules
-
- Oct 15, 2005
-
-
Bruce Momjian authored
-
- Jul 01, 2005
-
-
Teodor Sigaev authored
- Fix wrong index results on text, char, varchar for multibyte strings - Fix some SIGFPE signals - Add support for infinite timestamps - Because of locale settings, btree_gist can not be a prefix index anymore (for text). Each node holds now just the lower and upper boundary.
-
- May 21, 2005
-
-
Neil Conway authored
methods in a short-lived memory context, there is no need for GiST methods to do their own manual (and error-prone) memory management.
-
- May 16, 2005
-
-
Neil Conway authored
-
- May 12, 2005
-
-
Neil Conway authored
the "extern" keyword from function definitions, reorganize some PG_GETARG_XXX() usage, and similar.
-
- Mar 01, 2005
-
-
Teodor Sigaev authored
-
- Aug 30, 2004
-
-
Bruce Momjian authored
-
- Aug 29, 2004
-
-
Bruce Momjian authored
-
- Aug 21, 2004
-
-
Tom Lane authored
on non-gcc compilers.
-
- Jun 03, 2004
-
-
Teodor Sigaev authored
- Add aligment for interval data types - Avoid floating point overflow in penalty functions Janko Richter <jankorichter@yahoo.de> and teodor
-
- May 28, 2004
-
-
Teodor Sigaev authored
New version. Add support for int2, int8, float4, float8, timestamp with/without time zone, time with/without time zone, date, interval, oid, money and macaddr, char, varchar/text, bytea, numeric, bit, varbit, inet/cidr types for GiST
-