summaryrefslogtreecommitdiff
path: root/contrib/btree_gist/btree_date.c
Commit message (Collapse)AuthorAgeFilesLines
* Clean up newlines following left parenthesesAlvaro Herrera2020-01-301-32/+31
| | | | | | | | | | | | We used to strategically place newlines after some function call left parentheses to make pgindent move the argument list a few chars to the left, so that the whole line would fit under 80 chars. However, pgindent no longer does that, so the newlines just made the code vertically longer for no reason. Remove those newlines, and reflow some of those lines for some extra naturality. Reviewed-by: Michael Paquier, Tom Lane Discussion: https://postgr.es/m/20200129200401.GA6303@alvherre.pgsql
* Phase 3 of pgindent updates.Tom Lane2017-06-211-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | Don't move parenthesized lines to the left, even if that means they flow past the right margin. By default, BSD indent lines up statement continuation lines that are within parentheses so that they start just to the right of the preceding left parenthesis. However, traditionally, if that resulted in the continuation line extending to the right of the desired right margin, then indent would push it left just far enough to not overrun the margin, if it could do so without making the continuation line start to the left of the current statement indent. That makes for a weird mix of indentations unless one has been completely rigid about never violating the 80-column limit. This behavior has been pretty universally panned by Postgres developers. Hence, disable it with indent's new -lpl switch, so that parenthesized lines are always lined up with the preceding left paren. This patch is much less interesting than the first round of indent changes, but also bulkier, so I thought it best to separate the effects. Discussion: https://postgr.es/m/E1dAmxK-0006EE-1r@gemulon.postgresql.org Discussion: https://postgr.es/m/30527.1495162840@sss.pgh.pa.us
* Post-PG 10 beta1 pgindent runBruce Momjian2017-05-171-1/+1
| | | | perltidy run not included.
* Use CallerFInfoFunctionCall with btree_gist for numeric typesAndrew Dunstan2017-03-211-12/+12
| | | | | | | | | | None of the existing types actually need to use this mechanism, but this will allow support for enum types which will need it. A separate patch will adjust the varlena types support for consistency. Reviewed by Tom Lane and Anastasia Lubennikova Discussion: http://postgr.es/m/27220.1478360811@sss.pgh.pa.us
* Generate fmgr prototypes automaticallyPeter Eisentraut2017-01-171-0/+1
| | | | | | | | | | | | Gen_fmgrtab.pl creates a new file fmgrprotos.h, which contains prototypes for all functions registered in pg_proc.h. This avoids having to manually maintain these prototypes across a random variety of header files. It also automatically enforces a correct function signature, and since there are warnings about missing prototypes, it will detect functions that are defined but not registered in pg_proc.h (or otherwise used). Reviewed-by: Pavel Stehule <pavel.stehule@gmail.com>
* Add index-only scan support to btree_gist.Heikki Linnakangas2015-03-271-0/+7
| | | | | | inet, cidr, and timetz indexes still cannot support index-only scans, because they don't store the original unmodified value in the index, but a derived approximate value.
* Minor refactoring of btree_gist code.Heikki Linnakangas2015-03-261-2/+1
| | | | | | | The gbt_var_key_copy function was doing two different things depending on the boolean argument. Seems cleaner to have two separate functions. Remove unused argument from gbt_num_compress.
* Fix valgrind warning for btree_gist indexes on macaddr.Tom Lane2014-05-161-0/+1
| | | | | | | | | | | | | | | | | | The macaddr opclass stores two macaddr structs (each of size 6) in an index column that's declared as being of type gbtreekey16, ie 16 bytes. In the original coding this led to passing a palloc'd value of size 12 to the index insertion code, so that data would be fetched past the end of the allocated value during index tuple construction. This makes valgrind unhappy. In principle it could result in a SIGSEGV, though with the current implementation of palloc there's no risk since the 12-byte request size would be rounded up to 16 bytes anyway. To fix, add a field to struct gbtree_ninfo showing the declared size of the index datums, and use that in the palloc requests; and use palloc0 to be sure that any wasted bytes are cleanly initialized. Per report from Andres Freund. No back-patch since there's no current risk of a real problem.
* Create function prototype as part of PG_FUNCTION_INFO_V1 macroPeter Eisentraut2014-04-181-9/+0
| | | | | | | | | | | | | | | | | Because of gcc -Wmissing-prototypes, all functions in dynamically loadable modules must have a separate prototype declaration. This is meant to detect global functions that are not declared in header files, but in cases where the function is called via dfmgr, this is redundant. Besides filling up space with boilerplate, this is a frequent source of compiler warnings in extension modules. We can fix that by creating the function prototype as part of the PG_FUNCTION_INFO_V1 macro, which such modules have to use anyway. That makes the code of modules cleaner, because there is one less place where the entry points have to be listed, and creates an additional check that functions have the right prototype. Remove now redundant prototypes from contrib and other modules.
* Remove many -Wcast-qual warningsPeter Eisentraut2011-09-111-7/+7
| | | | | | This addresses only those cases that are easy to fix by adding or moving a const qualifier or removing an unnecessary cast. There are many more complicated cases remaining.
* Add postgres.h to *.c files for pg_upgrade, ltree, and btree_gist, andBruce Momjian2011-08-261-0/+2
| | | | | | remove from local *.h files. Per suggestion from Alvaro.
* pgindent run before PG 9.1 beta 1.Bruce Momjian2011-04-101-7/+7
|
* Add KNNGIST support to contrib/btree_gist.Tom Lane2011-03-021-1/+48
| | | | | | | This extends GiST's support for nearest-neighbor searches to many of the standard data types. Teodor Sigaev
* Remove cvs keywords from all files.Magnus Hagander2010-09-201-1/+1
|
* pgindent run for 9.0Bruce Momjian2010-02-261-4/+4
|
* Preventing intersection of ranges during page split. Changes are onlyTeodor Sigaev2009-12-021-6/+10
| | | | optimization, so don't backpatch.
* 8.4 pgindent run, with new combined Linux/FreeBSD/MinGW typedef listBruce Momjian2009-06-111-4/+5
| | | | provided by Andrew.
* Add $PostgreSQL$ markers to a lot of files that were missing them.Andrew Dunstan2008-05-171-0/+3
| | | | | | | | | | 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 */'
* Push index operator lossiness determination down to GIST/GIN opclassTom Lane2008-04-141-1/+6
| | | | | | | | | | | "consistent" functions, and remove pg_amop.opreqcheck, as per recent discussion. The main immediate benefit of this is that we no longer need 8.3's ugly hack of requiring @@@ rather than @@ to test weight-using tsquery searches on GIN indexes. In future it should be possible to optimize some other queries better than is done now, by detecting at runtime whether the index match is exact or not. Tom Lane, after an idea of Heikki's, and with some help from Teodor.
* Standard pgindent run for 8.1.Bruce Momjian2005-10-151-8/+8
|
* Pgindent run for 8.0.Bruce Momjian2004-08-291-106/+113
|
* - Add aligment of variable data typesTeodor Sigaev2004-06-031-1/+2
| | | | | | - Add aligment for interval data types - Avoid floating point overflow in penalty functions Janko Richter <jankorichter@yahoo.de> and teodor
* New version. Add support for int2, int8, float4, float8, timestamp ↵Teodor Sigaev2004-05-281-0/+191
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