Commit Graph

1204 Commits

Author SHA1 Message Date
Bruce Momjian c5133e5920 Allow /contrib include files to compile on their own. 2006-07-10 22:06:11 +00:00
Bruce Momjian f0cd764723 Add #include code to prevent multiple inclusion. 2006-07-10 21:03:58 +00:00
Bruce Momjian b538215d5d Remove a few baby-C macros in fuzzystrmatch. Add a few missing includes. 2006-07-10 18:40:16 +00:00
Bruce Momjian dab42382f4 Add index information to /contrib/pgstattuple:
This is an extension of pgstattuple to query information from indexes.
It supports btree, hash and gist. Gin is not supported. It scans only
index pages and does not read corresponding heap tuples. Therefore,
'dead_tuple' means the number of tuples with LP_DELETE flag.

Also, I added an experimental feature for btree indexes. It checks
fragmentation factor of indexes. If an leaf has the right link on the
next adjacent page in the file, it is assumed to be continuous (not
fragmented). It will help us to decide when to REINDEX.

ITAGAKI Takahiro
2006-07-06 02:18:07 +00:00
Bruce Momjian a7aa0b8189 Backpatch dbmirror fix for escape handling.
> Upstream confirmed my reply in the last mail in [1]: the complete
> escaping logic in DBMirror.pl is seriously screwew.
>
> [1] http://archives.postgresql.org/pgsql-bugs/2006-06/msg00065.php

I finally found some time to debug this, and I think I found a better
patch than the one you proposed. Mine is still hackish and is still a
workaround around a proper quoting solution, but at least it repairs
the parsing without introducing the \' quoting again.

I consider this a band-aid patch to fix the recent security update.
PostgreSQL gurus, would you consider applying this until a better
solution is found for DBMirror.pl?

Olivier, can you please confirm that the patch works for you, too?

Backpatched to 8.0.X.

Martin Pitt
2006-07-06 01:57:25 +00:00
Teodor Sigaev 1f7ef548ec Changes
* 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
2006-06-28 12:00:14 +00:00
Tom Lane 3f50ba27cf Create infrastructure for 'MinimalTuple' representation of in-memory
tuples with less header overhead than a regular HeapTuple, per my
recent proposal.  Teach TupleTableSlot code how to deal with these.
As proof of concept, change tuplestore.c to store MinimalTuples instead
of HeapTuples.  Future patches will expand the concept to other places
where it is useful.
2006-06-27 02:51:40 +00:00
Joe Conway 1d895f426f - During dblink_open, if transaction state was IDLE, force cursor count to
initially be 0. This is needed as a previous ABORT might have wiped out
  an automatically opened transaction without maintaining the cursor count.
- Fix regression test expected file for the correct ERROR message, which
  we now get given the above bug fix.
2006-06-21 16:43:11 +00:00
Teodor Sigaev 04e9704b9e Now ispell dictionary can eat dictionaries in MySpell format,
used by OpenOffice. Dictionaries are placed at
http://lingucomponent.openoffice.org/spell_dic.html
Dictionary automatically recognizes format of files.

Warning. MySpell's format has limitation with compound
word support: it's impossible to mark affix as
compound-only affix. So for norwegian, german etc
languages it's recommended to use original ispell format.
For that reason I don't want to remove my2ispell
scripts, it's has workaround at least for norwegian language.
2006-06-09 13:25:59 +00:00
Bruce Momjian 1758b3ec96 /contrib/adminpack: More clearly identify renaming of existing backend
functions.  I also found that pg_file_length was incorrectly documented
in the README as pg_file_size.
2006-06-08 14:32:11 +00:00
Bruce Momjian 12632d3c31 Add missing 3rd argument to open(). 2006-06-08 03:29:30 +00:00
Bruce Momjian 149008dfe7 Add missing 3rd parameter to open(). 2006-06-08 03:28:01 +00:00
Teodor Sigaev 92bcb5abe0 Allow do not lexize words in substitution.
Docs will be submitted some later, now it's at
 http://www.sai.msu.su/~megera/oddmuse/index.cgi/Thesaurus_dictionary
2006-06-06 16:25:55 +00:00
Teodor Sigaev a513ce2dff Fix wrong NOTICE/ERROR levels 2006-06-02 18:03:06 +00:00
Teodor Sigaev efe1d427da Distinguish between stop-word recognized in thesaurus_lexize() 2006-06-02 17:55:40 +00:00
Teodor Sigaev c7faf45160 Add more strict check of stop and non-recognized words,
allow only recognized words in thezaurus configuration file.
2006-06-02 15:35:42 +00:00
Tom Lane d77df813c9 Got tired of waiting for spoonbill's compiler to get fixed. Let's
see if using an intermediate variable avoids the gcc bug.
2006-06-01 02:39:59 +00:00
Teodor Sigaev c269f0f1e2 fix comparison with SPI_processed 2006-05-31 14:53:41 +00:00
Teodor Sigaev 22505f4703 Add thesaurus dictionary which can replace N>0 lexemes by M>0 lexemes.
It required some changes in lexize algorithm, but interface with
dictionaries stays compatible with old dictionaries.

Funded by Georgia Public Library Service and LibLime, Inc.
2006-05-31 14:05:31 +00:00
Tom Lane a0ffab351e Magic blocks don't do us any good unless we use 'em ... so install one
in every shared library.
2006-05-30 22:12:16 +00:00
Tom Lane e95703eac3 Un-DOS-ify newly added files. 2006-05-30 21:34:15 +00:00
Bruce Momjian 85f6e27d9b Add /contrib/adminpack to contrib/Makefile, do case-folding change. 2006-05-30 13:25:57 +00:00
Bruce Momjian 56f44784f6 Re-defines SHA2 symbols so that they would not conflict with certain
versions of OpenSSL.  If your OpenSSL does not contain SHA2, then there
should be no conflict.  But ofcourse, if someone upgrades OpenSSL,
server starts crashing.

Backpatched to 8.1.X.

Marko Kreen
2006-05-30 12:56:45 +00:00
Bruce Momjian 6216cc7e25 Re-add btree_gist description. 2006-05-30 12:27:39 +00:00
Bruce Momjian fe59e56660 Add Pgadmin administration functions to /contrib/adminpack.
Dave Page
2006-05-30 12:07:31 +00:00
Tom Lane 798e63ffb0 Remove CXT_printf/CXT1_printf macros. If anyone had found them to be of
any use in the past many years, we'd have made some effort to include
them in all executor node types; but in fact they were only in
nodeAppend.c and nodeIndexscan.c, up until I copied nodeIndexscan.c's
occurrence into the new bitmap node types.  Remove some other unused
macros in execdebug.h, too.  Some day the whole header probably ought to
go away in favor of better-designed facilities.
2006-05-23 15:21:52 +00:00
Tom Lane 5cf07901c5 Fix errors in fortuna PRNG reseeding logic that could cause a predictable
session key to be selected by pgp_sym_encrypt() in some cases.  This only
affects non-OpenSSL-using builds.  Marko Kreen
2006-05-21 20:22:16 +00:00
Bruce Momjian 19892feb3c Back out \' change for tsearch2, broke regression tests. 2006-05-19 04:39:47 +00:00
Bruce Momjian cc84163fa9 Use SQL standard '' rather than \' in /contrib. Backpatch to 8.1.X. 2006-05-19 02:38:47 +00:00
Teodor Sigaev c1f39437d0 Some optimizations by Volkan YAZICI <yazicivo@ttnet.net.tr> 2006-05-10 11:39:12 +00:00
Tom Lane a43974c6ba Code review for contrib/pg_freespacemap. Add a storedpages column to
pg_freespacemap_relations --- while one could theoretically get that
number by counting rows in pg_freespacemap_pages, it's surely the hard
way to do it.  Avoid expensive and inconvenient conversion to and from
text format.  Minor code and docs cleanup.
2006-05-04 20:39:34 +00:00
Teodor Sigaev 5320c6cf6b Make GIN opclass worked with intarray extensions 2006-05-03 16:31:07 +00:00
Teodor Sigaev 8a3631f8d8 GIN: Generalized Inverted iNdex.
text[], int4[], Tsearch2 support for GIN.
2006-05-02 11:28:56 +00:00
Tom Lane 4ade4fe422 Fix ltreeparentsel so it actually works ... 2006-04-27 18:24:35 +00:00
Tom Lane f66a3ca267 Un-break ltree. 2006-04-27 00:58:20 +00:00
Bruce Momjian 525de8d556 Improve /contrib/pg_buffercache installation to use BEGIN/COMMIT,
improve examples.

Mark Kirkwood
2006-04-26 22:50:17 +00:00
Bruce Momjian 136bea1540 Split out pg_freespace views to one for relations and another for pages,
pg_freespacemap_relations and pg_freespacemap_pages.

Mark Kirkwood
2006-04-26 22:46:09 +00:00
Bruce Momjian 028ec5cb0f Adjust /contrib/pg_freespace to show index free space as NULL (FSM only
tracks index pages, not free space on pages):

1/ Index free bytes set to NULL
2/ Comment added to the README briefly mentioning the index business
3/ Columns reordered more logically
4/ 'Blockid' column removed
5/ Free bytes column renamed to just 'bytes' instead of 'blockfreebytes'

Mark Kirkwood
2006-04-26 22:41:18 +00:00
Bruce Momjian 59d61409cd Move ltree parentsel() selectivity function into /contrib/ltree. 2006-04-26 22:33:36 +00:00
Bruce Momjian b3e4aefcfb Enhanced containment selectivity function for /contrib/ltree
Matteo Beccati
2006-04-26 18:28:34 +00:00
Tatsuo Ishii a34fd95977 Fix bug reported by Michael Fuhr on Sun, 23 Apr 2006 09:52:31 -0600
(pgsql-committers@postgresql.org).
2006-04-25 00:40:54 +00:00
Tatsuo Ishii 4799cd7f24 Add pgrowlocks 2006-04-23 02:17:59 +00:00
Tatsuo Ishii 66126f9687 Add new contrib function pgrowlocks. See README.pgrowlocks for more details. 2006-04-23 01:12:58 +00:00
Bruce Momjian 1cae920e32 Change int->int32, for clarity.
jw.pgsql@sduept.com
2006-04-12 21:46:31 +00:00
Teodor Sigaev e30df619cd Fix stupid mistake in rank_cd_def cleanup 2006-04-10 09:56:52 +00:00
Peter Eisentraut c8c864c261 Put flex'ed and bison'ed files in contrib in the distribution tarball, as
is done for the analogous files in the main distribution.
2006-04-03 18:47:41 +00:00
Teodor Sigaev cdfecf6e3e Minor cleanups 2006-04-03 08:37:41 +00:00
Teodor Sigaev 7f129956e1 Detoast query in g_intbig_consistent and copy query in g_int_consistent 2006-04-03 08:21:05 +00:00
Neil Conway a323ede280 Fix a few places that were checking for the return value of palloc() to be
non-NULL: palloc() ereports on OOM, so we can safely assume it returns a
valid pointer.
2006-03-19 22:22:56 +00:00
Tom Lane 20ab467d76 Improve parser so that we can show an error cursor position for errors
during parse analysis, not only errors detected in the flex/bison stages.
This is per my earlier proposal.  This commit includes all the basic
infrastructure, but locations are only tracked and reported for errors
involving column references, function calls, and operators.  More could
be done later but this seems like a good set to start with.  I've also
moved the ReportSyntaxErrorPosition logic out of psql and into libpq,
which should make it available to more people --- even within psql this
is an improvement because warnings weren't handled by ReportSyntaxErrorPosition.
2006-03-14 22:48:25 +00:00