Commit Graph

1567 Commits

Author SHA1 Message Date
Peter Eisentraut 83ebe3a562 Fix typo 2007-04-22 21:12:25 +00:00
Peter Eisentraut 74496bc298 Contrib module uuid-ossp for generating UUID values using the OSSP UUID
library.  New configure option --with-ossp-uuid to activate.
2007-04-21 17:26:18 +00:00
Andrew Dunstan f97d4a267a Add --with-libxslt configure option 2007-04-15 12:48:24 +00:00
Andrew Dunstan 1656cb76f7 revert change to build xml2 until a better fix is found 2007-04-14 12:57:07 +00:00
Andrew Dunstan 6506a584cc Enable building contrib/xml2 if configured using --with-libxml.
If this breaks things due to missing libxslt, then I'll have to
revert it, but let's see if it breaks the buildfarm.

Workarounds in case libxslt is missing include:
. don't configure with libxml, or
. don't build contrib modules from the contrib Makefile (use the individual module Makefiles instead), or
. change the xml2 Makefile
2007-04-13 18:50:01 +00:00
Tatsuo Ishii 2fca2c05e7 Add -F option to set fillfactor for tellers, accounts and branches.
Patch contributed by Pavan Deolasee. Along with Japanese doc
modification by Tatsuo Ishii.
2007-04-08 01:15:07 +00:00
Bruce Momjian b0194ab110 Add the usage count statistics to the information available in
contrib/pgbuffercache.

Greg Smith
2007-04-07 16:09:14 +00:00
Tatsuo Ishii e574f2a029 Enhance pgbench -l option to add timestamp. Patch contributed by Greg
Smith. Along with Japanese doc updation by Tasuo Ishii.

> This patch changes the way pgbench outputs its latency log files so that
> every transaction gets a timestamp and notes which transaction type was
> executed.  It's a one-line change that just dumps some additional
> information that was already sitting in that area of code. I also made a
> couple of documentation corrections and clarifications on some of the more
> confusing features of pgbench.
>
> It's straightforward to parse log files in this format to analyze what
> happened during the test at a higher level than was possible with the
> original format.  You can find some rough sample code to convert this
> latency format into CVS files and then into graphs at
> http://www.westnet.com/~gsmith/content/postgresql/pgbench.htm which I'll
> be expanding on once I get all my little patches sent in here.
2007-04-06 09:16:16 +00:00
Tatsuo Ishii 7e96269a82 Various pgbench enhancements. Patch contributed by ITAGAKI Takahiro.
Also tweak README.pgbench/README.pgbench_jis:
  Remove history after pgbench was added to PostgreSQL contrib module.
  Those info was not only redundant since it has already been in CVS
  log, but also incomplete.
--------------------------------------------------------------------------
The attached is a patch to optimize contrib/pgbench using new 8.3 features.

- Use DROP IF EXISTS to suppress errors for initial loadings.
- Use a combination of TRUNCATE and COPY to reduce WAL on creating
  the accounts table.

Also, there are some cosmetic changes.

- Change the output of -v option from "starting full vacuum..."
  to "starting vacuum accounts..." in reflection of the fact.
- Shape duplicated error checks into executeStatement().


There is a big performance win in "COPY with no WAL" feature.
Thanks for the efforts!
--------------------------------------------------------------------------
2007-04-06 08:49:44 +00:00
Tom Lane 37a609b27f Now that core functionality is depending on autoconf's AC_C_BIGENDIAN to be
right, there seems precious little reason to have a pile of hand-maintained
endianness definitions in src/include/port/*.h.  Get rid of those, and make
the couple of places that used them depend on WORDS_BIGENDIAN instead.
2007-04-06 05:36:51 +00:00
Tom Lane 3e23b68dac Support varlena fields with single-byte headers and unaligned storage.
This commit breaks any code that assumes that the mere act of forming a tuple
(without writing it to disk) does not "toast" any fields.  While all available
regression tests pass, I'm not totally sure that we've fixed every nook and
cranny, especially in contrib.

Greg Stark with some help from Tom Lane
2007-04-06 04:21:44 +00:00
Teodor Sigaev 9477f12ea8 Fix caching of unsuccessful initialization of parser or configuration.
Per report from Listmail <lists@peufeu.com>
2007-04-02 11:42:04 +00:00
Neil Conway 74b667ad42 Replace 4-clause licensed blf.[ch] with blowfish implementation
from PuTTY with is under minimal BSD/MIT license. Marko Kreen.
2007-03-28 22:48:58 +00:00
Tom Lane 0565579c5b Fix uninitialized-variable bug. 2007-03-28 01:28:34 +00:00
Teodor Sigaev 66daeb074b Add checking of end of line in parsing stopword list. Thanks to sharp eyes of Tom lane 2007-03-26 13:57:07 +00:00
Teodor Sigaev debb3aa8e9 Fix stopword and synonym files parsing bug in MSVC build, per report from
Magnus Hagander. Also, now it ignores space symbol after stopwords.
2007-03-26 12:25:35 +00:00
Tom Lane e85a01df67 Clean up the representation of special snapshots by including a "method
pointer" in every Snapshot struct.  This allows removal of the case-by-case
tests in HeapTupleSatisfiesVisibility, which should make it a bit faster
(I didn't try any performance tests though).  More importantly, we are no
longer violating portable C practices by assuming that small integers are
distinct from all pointer values, and HeapTupleSatisfiesDirty no longer
has a non-reentrant API involving side-effects on a global variable.

There were a couple of places calling HeapTupleSatisfiesXXX routines
directly rather than through the HeapTupleSatisfiesVisibility macro.
Since these places had to be changed anyway, I chose to make them go
through the macro for uniformity.

Along the way I renamed HeapTupleSatisfiesSnapshot to HeapTupleSatisfiesMVCC
to emphasize that it's only used with MVCC-type snapshots.  I was sorely
tempted to rename HeapTupleSatisfiesVisibility to HeapTupleSatisfiesSnapshot,
but forebore for the moment to avoid confusion and reduce the likelihood that
this patch breaks some of the pending patches.  Might want to reconsider
doing that later.
2007-03-25 19:45:14 +00:00
Teodor Sigaev bb8998a475 Fix parser bug on Windows with UTF8 encoding and C locale, the reason was
sizeof(wchar_t) = 2 instead of 4.
2007-03-22 15:58:24 +00:00
Alvaro Herrera c9d3b8f5d2 Fix uninitialized value in pgstatindex leading to invalid values being
reported in some cases.  Report and patch from Tatsuhito Kasahara.

Also fix a couple of other bugs I noticed in skimming the surrounding code.
2007-03-16 15:06:43 +00:00
Tom Lane 95f6d2d209 Make use of plancache module for SPI plans. In particular, since plpgsql
uses SPI plans, this finally fixes the ancient gotcha that you can't
drop and recreate a temp table used by a plpgsql function.

Along the way, clean up SPI's API a little bit by declaring SPI plan
pointers as "SPIPlanPtr" instead of "void *".  This is cosmetic but
helps to forestall simple programming mistakes.  (I have changed some
but not all of the callers to match; there are still some "void *"'s
in contrib and the PL's.  This is intentional so that we can see if
anyone's compiler complains about it.)
2007-03-15 23:12:07 +00:00
Teodor Sigaev 754148d81f Add GIN support for pg_trgm. From Guillaume Smet <guillaume.smet@gmail.com>
with minor editorization by me.

Hstore improvements
* add operation hstore ? text - excat equivalent of exist()
* remove undocumented behaviour of contains operation with NULL value
* now 'key'::text=>NULL returns '"key"=>NULL' instead of NULL
* Add GIN support for contains and exist operations
* Add GiST support for exist operatiion
* improve regression tests
2007-03-14 14:21:53 +00:00
Teodor Sigaev 15f91f2789 Add GIN support for pg_trgm. From Guillaume Smet <guillaume.smet@gmail.com>
with minor editorization by me.
2007-03-14 14:15:40 +00:00
Magnus Hagander b082ef7f12 Set stderr to unbuffered for pgbench on win32.
ITAGAKI Takahiro
2007-03-13 09:06:35 +00:00
Teodor Sigaev 2afb01dbde Athough cube is a varlena type, nowhere was a detoasting of cube's value, so
fix it.  Add macroses DatumGetNDBOX, PG_GETARG_NDBOX and PG_RETURN_NDBOX.
Backpatch for 8.2 too.

Previous versions use version 0 calling conventions. And fmgr code detoast
values for user-defined functions.
2007-03-07 21:21:12 +00:00
Neil Conway 90d76525c5 Add resetStringInfo(), which clears the content of a StringInfo, and
fixup various places in the tree that were clearing a StringInfo by hand.
Making this function a part of the API simplifies client code slightly,
and avoids needlessly peeking inside the StringInfo interface.
2007-03-03 19:32:55 +00:00
Bruce Momjian 053981f405 Add logging to /contrib/pg_standby if -k couldn't clean up the log file.
Darcy Buskermolen
2007-03-03 18:50:45 +00:00
Tom Lane 9f652d430f Fix up several contrib modules that were using varlena datatypes in not-so-obvious
ways.  I'm not totally sure that I caught everything, but at least now they pass
their regression tests with VARSIZE/SET_VARSIZE defined to reverse byte order.
2007-02-28 22:44:38 +00:00
Tom Lane 234a02b2a8 Replace direct assignments to VARATT_SIZEP(x) with SET_VARSIZE(x, len).
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
2007-02-27 23:48:10 +00:00
Bruce Momjian fb2b088cf4 Update /contrib/fuzzystrmatch error message to mention bytes, not just
'length', which can be characters.
2007-02-13 18:00:35 +00:00
Teodor Sigaev 44655290cc Fix backend crash in parsing incorrect tsquery.
Per report from Jon Rosebaugh <jon@inklesspen.com>
2007-02-12 14:14:33 +00:00
Magnus Hagander 933571129d Fix pg_standby to build on msvc. 2007-02-10 19:52:45 +00:00
Peter Eisentraut 6e1664beaf Remove useless CPPFLAGS. 2007-02-09 17:24:33 +00:00
Peter Eisentraut 994b1cb59e Add $PostgreSQL$ marker to contrib makefiles. 2007-02-09 17:04:00 +00:00
Peter Eisentraut c138b966d4 Replace useless uses of := by = in makefiles. 2007-02-09 15:56:00 +00:00
Bruce Momjian 51be14e928 Add /contrib/pg_standby:
pg_standby is a production-ready program that can be used to
  create a Warm Standby server. Other configuration is required
  as well, all of which is described in the main server manual.

Simon Riggs
2007-02-08 15:16:19 +00:00
Bruce Momjian 528779a2c6 Add /contrib/pg_standby:
pg_standby is a production-ready program that can be used to
  create a Warm Standby server. Other configuration is required
  as well, all of which is described in the main server manual.

Simon Riggs
2007-02-08 15:09:47 +00:00
Peter Eisentraut 086c189456 Normalize fgets() calls to use sizeof() for calculating the buffer size
where possible, and fix some sites that apparently thought that fgets()
will overwrite the buffer by one byte.

Also add some strlcpy() to eliminate some weird memory handling.
2007-02-08 11:10:27 +00:00
Peter Eisentraut 16059d39a0 Replace some strncpy() by strlcpy(). 2007-02-07 00:52:35 +00:00
Peter Eisentraut f11aa82d03 Use memcpy() instead of strncpy() for copying into varlena structures. 2007-02-07 00:32:15 +00:00
Neil Conway 2576dd4dee Fix two more regression tests whose expected outputs were not updated
for the recent may/might cleanup.
2007-02-01 21:05:29 +00:00
Bruce Momjian 8b4ff8b6a1 Wording cleanup for error messages. Also change can't -> cannot.
Standard English uses "may", "can", and "might" in different ways:

        may - permission, "You may borrow my rake."

        can - ability, "I can lift that log."

        might - possibility, "It might rain today."

Unfortunately, in conversational English, their use is often mixed, as
in, "You may use this variable to do X", when in fact, "can" is a better
choice.  Similarly, "It may crash" is better stated, "It might crash".
2007-02-01 19:10:30 +00:00
Teodor Sigaev d4c6da1527 Allow GIN's extractQuery method to signal that nothing can satisfy the query.
In this case extractQuery should returns -1 as nentries. This changes
prototype of extractQuery method to use int32* instead of uint32* for
nentries argument.
Based on that gincostestimate may see two corner cases: nothing will be found
or seqscan should be used.

Per proposal at http://archives.postgresql.org/pgsql-hackers/2007-01/msg01581.php

PS tsearch_core patch should be sightly modified to support changes, but I'm
waiting a verdict about reviewing of tsearch_core patch.
2007-01-31 15:09:45 +00:00
Neil Conway 8ff2bccee3 Squelch some VC++ compiler warnings. Mark float literals with the "f"
suffix, to distinguish them from doubles. Make some function declarations
and definitions use the "const" qualifier for arguments consistently.
Ignore warning 4102 ("unreferenced label"), because such warnings
are always emitted by bison-generated code. Patch from Magnus Hagander.
2007-01-26 17:45:42 +00:00
Tom Lane 686f15e39e Adjust pgbench so it won't spit up on non-select queries returning
tuples, which is entirely possible with custom scripts (consider
RETURNING, EXPLAIN, etc).
2007-01-22 02:17:30 +00:00
Teodor Sigaev f2a01b0d5a Fix localization support for multibyte encoding and C locale.
Slightly reworked patch from Tatsuo Ishii
2007-01-15 15:16:28 +00:00
Alvaro Herrera a62e2c2b57 Replace unnecessary DISABLE_ZLIB define in pgcrypto with HAVE_LIBZ from core.
Patch from Marko Kreen.
2007-01-14 20:55:14 +00:00
Bruce Momjian 25d64529b8 Update copyright script to allow spaces around dash. 2007-01-10 02:41:28 +00:00
Tatsuo Ishii a733d281c0 Update copyright year 2007-01-10 01:18:40 +00:00
Bruce Momjian 29dccf5fe0 Update CVS HEAD for 2007 copyright. Back branches are typically not
back-stamped for this.
2007-01-05 22:20:05 +00:00
Tom Lane 0d5eb8f9ea Fix btree_gist for new larger money type. 2007-01-03 18:57:19 +00:00
Tom Lane 859b8dd51a Add a defense to prevent core dumps if 8.2 version of rank_cd() is used with
the 8.1 SQL function definition for it.  Per report from Rajesh Kumar Mallah,
such a DBA error doesn't seem at all improbable, and the cost of checking for
it is not very high compared to the cost of running this function.  (It would
have been better to change the C name of the function so it wouldn't be called
by the old SQL definition, but it's too late for that now in the 8.2 branch.)
2006-12-28 01:09:01 +00:00
Teodor Sigaev 49b64d346f Fix memory reallocation condition 2006-12-26 14:54:24 +00:00
Tatsuo Ishii 39def593c5 Call srandom() instead of srand().
pgbench calls random() later, so it should have called srandom().
On most platforms except Windows srandom() is actually identical
to srand(), so the bug only bites Windows users.
per bug report from Akio Ishida.
2006-12-26 01:02:05 +00:00
Tom Lane a78fcfb512 Restructure operator classes to allow improved handling of cross-data-type
cases.  Operator classes now exist within "operator families".  While most
families are equivalent to a single class, related classes can be grouped
into one family to represent the fact that they are semantically compatible.
Cross-type operators are now naturally adjunct parts of a family, without
having to wedge them into a particular opclass as we had done originally.

This commit restructures the catalogs and cleans up enough of the fallout so
that everything still works at least as well as before, but most of the work
needed to actually improve the planner's behavior will come later.  Also,
there are not yet CREATE/DROP/ALTER OPERATOR FAMILY commands; the only way
to create a new family right now is to allow CREATE OPERATOR CLASS to make
one by default.  I owe some more documentation work, too.  But that can all
be done in smaller pieces once this infrastructure is in place.
2006-12-23 00:43:13 +00:00
Teodor Sigaev ca5bc1ae51 Fix convertion for 'PFX flag N num' 2006-12-21 17:35:28 +00:00
Neil Conway d49fa4c866 Fix typos in comments and error messages in HStore. Patch from Filip
Rembialkowski, with some additional fixes by myself.
2006-12-05 17:36:00 +00:00
Teodor Sigaev 6cd9a58480 Fix core dump of ispell for case of non-successfull initialization.
Previous versions aren't affected.

Fix synonym dictionary init: string should be malloc'ed, not palloc'ed. Bug
introduced recently while fixing lowerstr().
2006-12-04 09:26:57 +00:00
Tom Lane 2822c7c0fc Make contrib/isn pass the opr_sanity sanity checks: add missing
commutator operators, and mark hash-opclass members as oprcanhash.
This is a pretty ugly, brute-force solution, but it seems that getting
rid of all these redundant-looking operators would require some tweaks
in the core operator-resolution code to behave nicely, and I'm not
willing to risk that just before RC1.
2006-11-24 18:44:37 +00:00
Teodor Sigaev 3de2682a1e Fix lowercasing while parse OO dictionary 2006-11-23 17:35:14 +00:00
Teodor Sigaev 84151d0644 Avoid infinity calculations in rank_cd 2006-11-22 15:55:05 +00:00
Teodor Sigaev dd92a8c33f Fix type in return value 2006-11-21 18:31:28 +00:00
Teodor Sigaev 419fe7cd1b Fix bug http://archives.postgresql.org/pgsql-bugs/2006-10/msg00258.php.
Fix string's length calculation for recoding, fix strlower() to avoid wrong
assumption about length of recoded string (was: recoded string is no greater
that source, it may not true for multibyte encodings)
Thanks to Thomas H. <me@alternize.com> and Magnus Hagander <mha@sollentuna.net>
2006-11-20 14:03:30 +00:00
Neil Conway 87a50169d2 Minor code cleanup for pgcrypto: for UDFs declared to be strict, checking
for NULL-ness of function arguments is wasted code.
2006-11-10 06:28:29 +00:00
Neil Conway 9d6f26325f Fix two typos. 2006-11-08 19:06:15 +00:00
Teodor Sigaev 092ed294fc New README, forgotten when docs was updated 2006-11-08 16:00:29 +00:00
Tom Lane 74686b6de7 Get rid of some unnecessary dependencies on DataDir: wherever possible,
the backend should rely on its working-directory setting instead.
Also do some message-style police work in contrib/adminpack.
2006-11-06 03:06:41 +00:00
Teodor Sigaev bf028fa8a6 Add description of new features 2006-10-31 16:23:05 +00:00
Tom Lane bd95c74985 Code cleanup for pg_buffercache, from Mark Kirkwood. 2006-10-22 17:49:21 +00:00
Tatsuo Ishii a5007d671a pgbench: More fix with handling default scaling factor in the default
scenarios. With multiple clinets, only the first client got the right
scaling factor and this gave a illusion of better performance in case
of the scaling factor greater than 1.
2006-10-21 06:31:28 +00:00
Tom Lane 7feedda098 Marginal code cleanups in pg_logdir_ls: use ReadDir not readdir,
and avoid scribbling on its result (might be safe but why risk it)
2006-10-20 00:59:03 +00:00
Tom Lane 443abd83e5 Add externs for optarg/optind where apparently needed. Per Magnus. 2006-10-19 20:38:48 +00:00
Tom Lane 28997903a1 Handle missing M_PI the same way we've been doing in the core code,
instead of inserting an MSVC dependency.
2006-10-19 20:08:03 +00:00
Tom Lane f6e00ae128 Further MSVC portability fixes from Magnus. 2006-10-19 20:03:08 +00:00
Tom Lane 2315df21f8 Fix a couple of places that were assuming debug_query_string couldn't
be NULL ... seems an unsafe assumption.
2006-10-19 19:53:03 +00:00
Tom Lane def651f48f Clean up local redeclarations of variables with DLLIMPORT, per report
from Magnus that MSVC complains about this.
2006-10-19 18:32:48 +00:00
Neil Conway fd38d726a9 Fix typo. 2006-10-19 17:48:04 +00:00
Tom Lane 72ec567a9a Simplify contrib Makefiles by removing unnecessary SRCS macro,
per Magnus.
2006-10-19 17:40:03 +00:00
Teodor Sigaev 3f16647960 Rename function 'isexists' and 'isdefined' to
'exist' and 'defined' accordingly. Old names
are saved not mentioned in docs - for compatibility
with old applications.
Per discussion
http://archives.postgresql.org/pgsql-hackers/2006-10/msg00571.php
2006-10-11 16:42:51 +00:00
Tom Lane 71a6f8b85b On platforms that have getrlimit(RLIMIT_STACK), use it to ensure that
max_stack_depth is not set to an unsafe value.

This commit also provides configure-time checking for <sys/resource.h>,
and cleans up some perhaps-unportable code associated with use of that
include file and getrlimit().
2006-10-07 19:25:29 +00:00
Tom Lane e378f82e00 Make use of qsort_arg in several places that were formerly using klugy
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.
2006-10-05 17:57:40 +00:00
Tom Lane c48f2e3124 Improve error messages from to_tsquery per yesterday's discussion:
provide the bad input, and be sure to mention that we are talking about
a tsearch query.
2006-10-04 17:52:52 +00:00
Bruce Momjian f99a569a2e pgindent run for 8.2. 2006-10-04 00:30:14 +00:00
Bruce Momjian 26ffa627ac Update tsearch2 README.
Robert Treat
2006-10-02 22:32:10 +00:00
Tom Lane 363c8cf21f Remove accented characters in comments, to avoid failures when this
file is read with an incompatible client_encoding setting.  Per report
from Tim N. van der Leeuw.
2006-10-01 18:37:53 +00:00
Tom Lane 87cd901cba Suppress compiler warnings. 2006-09-30 18:44:37 +00:00
Tom Lane 8136041a80 uninstall script for sslinfo 2006-09-30 18:24:19 +00:00
Tom Lane ad5031feac uninstall script for pg_freespacemap 2006-09-30 18:15:48 +00:00
Tom Lane 035599da01 uninstall script for pgrowlocks - Josh Drake 2006-09-30 18:08:32 +00:00
Tom Lane 8fd0e43c4e Add uninstall script for adminpack - Josh Drake 2006-09-30 18:03:06 +00:00
Tom Lane beca984e5f Fix bugs in plpgsql and ecpg caused by assuming that isspace() would only
return true for exactly the characters treated as whitespace by their flex
scanners.  Per report from Victor Snezhko and subsequent investigation.

Also fix a passel of unsafe usages of <ctype.h> functions, that is, ye olde
char-vs-unsigned-char issue.  I won't miss <ctype.h> when we are finally
able to stop using it.
2006-09-22 21:39:58 +00:00
Tom Lane 9e936693a9 Fix free space map to correctly track the total amount of FSM space needed
even when a single relation requires more than max_fsm_pages pages.  Also,
make VACUUM emit a warning in this case, since it likely means that VACUUM
FULL or other drastic corrective measure is needed.  Per reports from Jeff
Frost and others of unexpected changes in the claimed max_fsm_pages need.
2006-09-21 20:31:22 +00:00
Tom Lane bfd1ffa948 Change patternsel (LIKE/regex selectivity estimation) so that if there
is a large enough histogram, it will use the number of matches in the
histogram to derive a selectivity estimate, rather than the admittedly
pretty bogus heuristics involving examining the pattern contents.  I set
'large enough' at 100, but perhaps we should change that later.  Also
apply the same technique in contrib/ltree's <@ and @> estimator.  Per
discussion with Stefan Kaltenbrunner and Matteo Beccati.
2006-09-20 19:50:21 +00:00
Tom Lane 1246d797e4 Rename xml_valid() to xml_is_well_formed(), but provide a temporary
alias with the old name for backwards compatibility.  Per discussion,
the old name is actively wrong because validity and well-formedness
have different meanings in XML.
2006-09-16 16:18:11 +00:00
Tom Lane ac733df61b Fix some more uses of str[n]casecmp that should be pg_str[n]casecmp. 2006-09-16 13:31:40 +00:00
Tom Lane aab964b311 Fix some uses of str[n]casecmp that should be pg_str[n]casecmp. 2006-09-15 21:35:30 +00:00
Bruce Momjian a86e70b8f8 Remove sslinfo copyright with author permission, keep author attribution.
Victor Wagner
2006-09-14 20:50:51 +00:00
Tatsuo Ishii ea21eea6a8 Change "tps" to "scale" to avoid confusion
Fix bug with handling default scaling factor in the default
scenarios
2006-09-13 00:39:19 +00:00
Teodor Sigaev 67e7f0ab34 Add uninstall script 2006-09-12 16:11:44 +00:00
Tom Lane d3f54c7907 Spell readme file's name correctly, per buildfarm reports. 2006-09-12 14:47:24 +00:00
Peter Eisentraut e79380e5ae Small fix for the README install for contrib/sslinfo.
Dave Page
2006-09-12 11:46:11 +00:00
Tom Lane 7ce2ff2d22 Move xml2's PG_MODULE_MAGIC block to the right source file, per Michael Fuhr. 2006-09-11 15:30:32 +00:00
Tom Lane 41dcc65c0e Rename the uninstall scripts for contrib/lo and contrib/tsearch2 to
match the convention that foo's uninstall script is uninstall_foo.sql.
Also, stop installing lo_test.sql, which really ought to be made into
a regression test anyway (though it's unclear how to avoid a dependency
on the current OID counter...)
2006-09-11 15:14:46 +00:00
Tom Lane 9fc4c6b20b Fix omissions in contrib uninstall scripts. Michael Fuhr 2006-09-11 02:10:26 +00:00
Tom Lane 4ee24cbb55 Install a cleaner solution to the AIX libpq linking problem, as per
an earlier discussion.  Centralize assumptions about what libpq depends
on in one place in Makefile.global.  I am unconvinced that this list
is complete, but since ecpg seems to have gotten along with just these
entries, we'll try it this way and see what happens.
2006-09-10 22:07:02 +00:00
Tom Lane 723af8e67a Fix dblink build for --enable-nls or --enable-openssl on AIX.
Per Chris Browne.
2006-09-10 21:38:26 +00:00
Tom Lane 5e08e49637 contrib/isn updates from Jeremy Kronuz. 2006-09-10 20:45:17 +00:00
Tom Lane 684ad6a92f Rename contrib contains/contained-by operators to @> and <@, per discussion. 2006-09-10 17:36:52 +00:00
Tom Lane dff84dc762 Add contrib/isn module for ISBN/ISSN/EAN13/etc product numbers, and
remove the old isbn_issn module which is about to be obsoleted by EAN13.
contrib/isn is by Germán Méndez Bravo.  Our thanks to Garrett A. Wollman
for having written the original isbn_issn module.
2006-09-09 04:07:52 +00:00
Tom Lane 389870b256 Be more wary about which LIBS elements to pull into sslinfo link.
Per buildfarm results.
2006-09-06 18:30:17 +00:00
Teodor Sigaev 34ec0c81af Fix compiler warnings on 64-bit boxes: difference between
pointers are int64, but warnings are emitted for position info in
error messages in parser, so, just cast it to int32
2006-09-06 07:22:14 +00:00
Tom Lane 433caead84 Fix sslinfo so it builds on Darwin. 2006-09-05 23:15:02 +00:00
Tom Lane 94ec712cd2 Silence compiler warning about signed vs unsigned chars. 2006-09-05 23:07:16 +00:00
Tom Lane 6b41d642e3 Silence compiler warnings about incompatible function pointer types. 2006-09-05 23:02:28 +00:00
Tom Lane 7d4838dca8 Remove pgcrypto functions that were deprecated and slated for removal.
Marko Kreen
2006-09-05 21:26:48 +00:00
Teodor Sigaev febc10de2d Fix markup and license. 2006-09-05 18:39:08 +00:00
Teodor Sigaev 642194ba0c Add hstore contrib module.
Per discussion
http://archives.postgresql.org/pgsql-hackers/2006-08/msg01409.php
2006-09-05 18:00:58 +00:00
Tom Lane af7d257e21 Remove contrib modules that have been migrated to pgfoundry: adddepend,
dbase, dbmirror, fulltextindex, mac, userlock; or abandoned: mSQL-interface,
tips.
2006-09-05 17:20:29 +00:00
Tom Lane 5a248cd2e4 Bring sslinfo Makefile up to speed for VPATH and pgxs builds. 2006-09-04 22:22:36 +00:00
Peter Eisentraut 6dc920de59 sslinfo contrib module - information about current SSL certificate
Author: Victor Wagner <vitus@cryptocom.ru>
2006-09-04 15:07:46 +00:00
Bruce Momjian 70bc947dc9 Update Japanese readme for pgstattuple. 2006-09-04 03:49:05 +00:00
Tom Lane c9a6490991 Clean up some leftover problems in pgstattuple: remove unwanted and
unportable elog(NOTICE) report, fix install/uninstall sequence.
Itagaki Takahiro
2006-09-04 02:03:04 +00:00
Bruce Momjian 0c4f2894f9 Use '' rather than \' for literal single quotes in strings in
/contrib/tsearch2.

Teodor Sigaev
2006-09-02 22:03:30 +00:00
Joe Conway 52a3ed9fac Added async query capability. Original patch by
Kai Londenberg, modified by Joe Conway
2006-09-02 21:11:15 +00:00
Bruce Momjian 74924d29fa Add functions to /contrib/pgstattuple that show index statistics and
index page contents.

Satoshi Nagayasu
2006-09-02 17:05:29 +00:00
Teodor Sigaev 72a3582522 Add description of tsvector type layout 2006-08-29 13:57:34 +00:00
Teodor Sigaev 3a214ab0f1 Remove pos comparison in silly_cmp_tsvector(): it is not a semantically significant 2006-08-29 13:39:20 +00:00
Teodor Sigaev 9711782628 Fix incorrect length of lexemes in silly_cmp_tsvector() 2006-08-29 13:31:54 +00:00
Bruce Momjian 32883a5d3c Add blank line. 2006-08-25 23:45:02 +00:00
Bruce Momjian ad9674043a Add 'feedback' section heading to xml2. 2006-08-25 23:43:11 +00:00
Teodor Sigaev 74dbba701f Fix regression tests: after changing comparing function
order is changed.
2006-08-25 07:39:08 +00:00
Teodor Sigaev 8f91e2b607 Fix compare bug for tsvector: problem was in aligment. Per Stefan Kaltenbrunner <stefan@kaltenbrunner.cc> and Phil Frost <indigo@bitglue.com> 2006-08-24 17:37:34 +00:00
Bruce Momjian 6935652c34 Update XML2 documentation for xpath_table().
John Gray
2006-08-24 01:41:06 +00:00
Tatsuo Ishii 66541c5aa5 Fix pgbench to handle empty lines in script files as documented.
patches contributed by Itagaki Takahiro.
2006-08-15 13:05:30 +00:00
Teodor Sigaev e7d490f91d Fix bug introduced by last patch, thanks again to Mario Weilguni <mweilguni@sime.com> 2006-08-08 15:45:18 +00:00
Teodor Sigaev 6d54320002 fix bug about modifying value in shared buffer,
what was a reason to corrupt index.
Thank to Mario Weilguni <mweilguni@sime.com> to
discover a bug.
2006-08-07 17:39:04 +00:00
Neil Conway 63d3f5e593 Fix references to the Options section in the pgcrypto documentation.
Patch from Michael Fuhr.
2006-08-05 00:29:11 +00:00
Tom Lane 09d3670df3 Change the relation_open protocol so that we obtain lock on a relation
(table or index) before trying to open its relcache entry.  This fixes
race conditions in which someone else commits a change to the relation's
catalog entries while we are in process of doing relcache load.  Problems
of that ilk have been reported sporadically for years, but it was not
really practical to fix until recently --- for instance, the recent
addition of WAL-log support for in-place updates helped.

Along the way, remove pg_am.amconcurrent: all AMs are now expected to support
concurrent update.
2006-07-31 20:09:10 +00:00
Tatsuo Ishii 68dfef040b Fix memory allocation bug in pgbench.
patches submitted by ITAGAKI Takahiro.
2006-07-31 05:15:14 +00:00
Tatsuo Ishii 46d9c2ec8f Change the delta val from 0 and 10000 to -5000 and 5000 per recent
discussion in hackers list.  Also enhance predefined benchmark
scenarios to reflect the scaling factor parameter flexibly.
2006-07-28 22:58:26 +00:00
Tom Lane 5f0473534f Fix incorrect function return code in cube_cmp and cube_dim;
update regression expected files to what I think is correct.
2006-07-27 21:55:09 +00:00
Andrew Dunstan 9f99edfd7e revert last change - broke non-AIX platforms. 2006-07-27 19:58:39 +00:00
Andrew Dunstan c2d1138351 another try at keeping AIX/ppc happy on cube test. 2006-07-27 18:38:54 +00:00
Andrew Dunstan 596b858fcb fix most regression tests for new cube code. 2006-07-27 16:12:36 +00:00
Tatsuo Ishii 0c57c832b9 New features contributed by Tomoaki Sato.
- predefined variable "tps"
  The value of variable tps is taken from the scaling factor
  specified by -s option.

- -D option
  Variable values can be defined by -D option.

- \set command now allows arithmetic calculations.
2006-07-26 07:24:50 +00:00
Bruce Momjian 796de9c1ed /contrib/cube improvements:
Update the calling convention for all external facing functions. By
external facing, I mean all functions that are directly referenced in
cube.sql. Prior to my update, all functions used the older V0 calling
convention. They now use V1.

New Functions:

cube(float[]), which makes a zero volume cube from a float array

cube(float[], float[]), which allows the user to create a cube from
two float arrays; one for the upper right and one for the lower left
coordinate.

cube_subset(cube, int4[]), to allow you to reorder or choose a subset of
dimensions from a cube, using index values specified in the array.

Joshua Reich
2006-07-25 23:23:45 +00:00
Tom Lane 10b9ca3d05 Split the buffer mapping table into multiple separately lockable
partitions, as per discussion.  Passes functionality checks, but
I don't have any performance data yet.
2006-07-23 03:07:58 +00:00
Neil Conway c28fbd4589 pgcrypto merge cleanup:
- Few README fixes
  - Keep imath Id string, put $PostgreSQL$ separately.

Patch from Marko Kreen.
2006-07-19 17:05:50 +00:00
Tom Lane a420818d67 Fix a few places where $Id$ and $Header$ CVS tags had crept into the
source tree.  They should all be $PostgreSQL$ of course.
2006-07-16 02:44:01 +00:00
Tom Lane 89e2a95589 Fix some pgcrypto portability issues, per Marko Kreen. 2006-07-15 15:27:14 +00:00
Tom Lane a7143b3088 Fix some makefiles that fail to yield good results from 'make -qp'.
This doesn't really matter for ordinary building of Postgres, but it's
useful for automated checks, such as my just-committed pgcheckdefines.
2006-07-15 03:33:14 +00:00
Tom Lane e2f7eb36d6 In PGP public key tests, encrypt the secret key with AES not CAST5,
so that the test passes with or without OpenSSL.  Marko Kreen
2006-07-14 17:47:40 +00:00
Tom Lane ae643747b1 Fix a passel of recently-committed violations of the rule 'thou shalt
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.
2006-07-14 05:28:29 +00:00
Bruce Momjian 03c2e5924e Add additional includes needed on some platforms. 2006-07-14 04:44:46 +00:00
Bruce Momjian 66c15dfda1 Adjust /contrib for new include file contents. 2006-07-13 16:57:31 +00:00
Peter Eisentraut 6809c064d7 Be consistent about not using ECHO_N/ECHO_C (seems unnecessary on Linux). 2006-07-13 14:44:33 +00:00
Neil Conway d0b54441db Fix C++-style comment. 2006-07-13 04:52:51 +00:00
Neil Conway 1abf76e82c "Annual" pgcrypto update from Marko Kreen:
Few cleanups and couple of new things:

 - add SHA2 algorithm to older OpenSSL
 - add BIGNUM math to have public-key cryptography work on non-OpenSSL
   build.
 - gen_random_bytes() function

The status of SHA2 algoritms and public-key encryption can now be
changed to 'always available.'

That makes pgcrypto functionally complete and unless there will be new
editions of AES, SHA2 or OpenPGP standards, there is no major changes
planned.
2006-07-13 04:15:25 +00:00
Bruce Momjian ac230e7431 Alphabetically order reference to include files, "S"-"Z". 2006-07-11 18:26:11 +00:00
Bruce Momjian 0ff3461bcc Alphabetically order reference to include files, "N" - "S". 2006-07-11 17:26:59 +00:00
Bruce Momjian 3a534ade39 Alphabetically order reference to include files, "G" - "M". 2006-07-11 17:04:13 +00:00
Teodor Sigaev 234163649e GIN improvements
- Replace sorted array of entries in maintenance_work_mem to binary tree,
  this should improve create performance.
- More precisely calculate allocated memory, eliminate leaks
  with user-defined extractValue()
- Improve wordings in tsearch2
2006-07-11 16:55:34 +00:00
Bruce Momjian fa601357fb Sort reference of include files, "A" - "F". 2006-07-11 16:35:33 +00:00
Teodor Sigaev 4fe8ba63fe Fix bug corrupting query in gist consistent function.
Thank to Mario Weilguni <mweilguni@sime.com> to discover a bug.
2006-07-11 16:00:44 +00:00
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
Neil Conway 48fb696753 Fix a number of syntax errors in contrib modules' uninstall scripts.
Most of the changes add the mandatory USING clause to DROP OPERATOR
CLASS statements.  DROP TYPE is now DROP TYPE CASCADE; without
CASCADE a DROP TYPE fails due to the circular dependency on the
type's I/O functions.  The DROP FUNCTION statements for the I/O
functions have been removed, as DROP TYPE CASCADE removes them
automatically. Patch from Michael Fuhr.
2006-03-13 18:04:58 +00:00
Bruce Momjian f3d99d160d Add CVS tag lines to files that were lacking them. 2006-03-11 04:38:42 +00:00
Neil Conway 7992d0fbca Remove a few places that attempted to define INT_MAX, SCHAR_MAX, and
similar constants if they were not previously defined. All these
constants must be defined by limits.h according to C89, so we can
safely assume they are present.
2006-03-11 01:19:22 +00:00
Tom Lane 7d84d3ec1c Fix order of linking of libxslt and libxml2, per Dave Page. 2006-03-10 15:39:42 +00:00
Bruce Momjian daab4a101f Update /contrib regression tests for escape_string_warning. 2006-03-08 03:51:52 +00:00
Tom Lane fb51ad3419 Make all our flex and bison files use %option prefix or %name-prefix
(respectively) to rename yylex and related symbols.  Some were doing
it this way already, while others used not-too-reliable sed hacks in
the Makefiles.  It's all nice and consistent now.
2006-03-07 01:03:12 +00:00
Bruce Momjian f2f5b05655 Update copyright for 2006. Update scripts. 2006-03-05 15:59:11 +00:00
Teodor Sigaev 38c4fe87ac Significantly improve ranking:
1) rank_cd now use weight of lexemes
2) rank_cd and rank can use any combination of normalization methods:
        no normalization
        normalization by log(length of document)
        -----/------- by length of document
        -----/------- by number of unique word in document
        -----/------- by log(number of unique word in document)
        -----/------- by number of covers (only rank_cd)

Improve cover's search.

TODO: changes in documentation
2006-03-02 19:07:19 +00:00
Neil Conway 305fcb7aa4 Woops: also update the alternative "expected" files for contrib/cube's
regression tests to account for the new error message wording. It seems
today is not my day...
2006-03-01 23:00:56 +00:00
Neil Conway 485541a3aa Update the expected regression test results to account for the changes to
error messages I made yesterday -- thanks to Andrew Dunstan for reporting
this, and my apologies for missing it the first time.
2006-03-01 21:09:32 +00:00
Neil Conway 0d9742f99a Attached is a patch that replaces a bunch of places where StringInfos
are unnecessarily allocated on the heap rather than the stack. If the
StringInfo doesn't outlive the stack frame in which it is created,
there is no need to allocate it on the heap via makeStringInfo() --
stack allocation is faster.  While it's not a big deal unless the
code is in a critical path, I don't see a reason not to save a few
cycles -- using stack allocation is not less readable.

I also cleaned up a bit of code along the way: moved variable
declarations into a more tightly-enclosing scope where possible,
fixed some pointless copying of strings in dblink, etc.
2006-03-01 06:51:01 +00:00
Neil Conway 8e5a10d46c This patch makes the error message strings throughout the backend
more compliant with the error message style guide. In particular,
errdetail should begin with a capital letter and end with a period,
whereas errmsg should not. I also fixed a few related issues in
passing, such as fixing the repeated misspelling of "lexeme" in
contrib/tsearch2 (per Tom's suggestion).
2006-03-01 06:30:32 +00:00
Peter Eisentraut 7f4f42fa10 Clean up CREATE FUNCTION syntax usage in contrib and elsewhere, in
particular get rid of single quotes around language names and old WITH ()
construct.
2006-02-27 16:09:50 +00:00
Peter Eisentraut fe83b3ebc6 contrib uninstall scripts
by David Fetter
2006-02-27 12:54:39 +00:00
Peter Eisentraut e6917b1255 Remove ora2pg; now available at <http://www.samse.fr/GPL/ora2pg/>. 2006-02-25 19:18:58 +00:00
Tom Lane f87d4875e9 Fix vacuumlo to avoid unnecessary use of backslash in search pattern.
Per Michael Fuhr.
2006-02-23 22:33:59 +00:00
Teodor Sigaev dde9457294 Fixing and improve compound word support. This changes cannot be applied to
previous version iwthout recreating tsvector fields...

Thanks to Alexander Presber <aljoscha@weisshuhn.de> to discover a problem.
2006-02-20 17:51:05 +00:00
Neil Conway ce9b75db6b Patch from Marko Kreen:
pgcrypto crypt()/md5 and hmac() leak memory when compiled against
OpenSSL as openssl.c digest ->reset will do two DigestInit calls
against a context.  This happened to work with OpenSSL 0.9.6
but not with 0.9.7+.

Reason for the messy code was that I tried to avoid creating
wrapper structure to transport algorithm info and tried to use
OpenSSL context for it.  The fix is to create wrapper structure.

It also uses newer digest API to avoid memory allocations
on reset with newer OpenSSLs.

Thanks to Daniel Blaisdell for reporting it.
2006-02-18 20:48:51 +00:00
Tom Lane e9b978c82b Need a DLLIMPORT for MaxFSMPages, per buildfarm failure on snake. 2006-02-14 15:03:59 +00:00
Bruce Momjian d5dd3d451e Add contrib/pg_freespacemap to display free space map information.
Mark Kirkwood
2006-02-12 03:55:53 +00:00
Tom Lane b35fdaaa1a Clean up some signedness warnings. 2006-02-10 15:57:58 +00:00
Tom Lane b2be41a710 Fix fallout from psql line-wrapping patch. 2006-02-10 15:47:44 +00:00
Teodor Sigaev 01f2172ec1 Allow "'" symbol in affixes ("'s" affix in english): it was diallowed during
multibyte support work.
Add line number to error output during affix file parsing.
2006-02-10 12:56:14 +00:00
Teodor Sigaev 011c520cb6 renew output of regression test accordingly to
http://archives.postgresql.org/pgsql-committers/2006-02/msg00089.php
2006-02-10 11:18:40 +00:00
Teodor Sigaev 46a25ce6a9 1 Fix bug with very short word: prefix and suffix might be overlapped,
sorry but fix can't be applyed to previous version: it's require
  refill tsvector...
2 Small optimize of load time for huge dictionaries
3 use palloc instead of malloc during load dict file
2006-02-09 18:04:20 +00:00
Teodor Sigaev a6fefc866c Check number of affixes to prevent core dump with zero number of affixes 2006-02-06 15:45:34 +00:00
Teodor Sigaev 5e2707c45f Snowball multibyte. It's a pity, but snowball sources is very diferent for multibyte and
singlebyte encodings, so we should have snowball for every encodings.

I hope that finalize multibyte support work in tsearch2, but testing is needed...
2006-01-27 16:32:31 +00:00
Tom Lane 97ec950186 Update btree_gist for CIDR/INET changes --- there's really no need to
have a separate set of CIDR code here, either.
2006-01-26 04:22:36 +00:00
Teodor Sigaev 80324fb1e3 Fix typeing as Tom suggest 2006-01-23 14:24:06 +00:00
Tom Lane 33feb55c47 Replace bitwise looping with bytewise looping in hemdistsign and
sizebitvec of tsearch2, as well as identical code in several other
contrib modules.  This provided about a 20X speedup in building a
large tsearch2 index ... didn't try to measure its effects for other
operations.  Thanks to Stephan Vollmer for providing a test case.
2006-01-20 22:46:16 +00:00
Tom Lane 2645cb54cb Fix the assert_enabled issue properly. This eliminates the former ABI
difference between USE_ASSERT_CHECKING and not: the assert_enabled
variable is always there.
2006-01-08 21:24:37 +00:00
Tom Lane 507e07e277 There is a signedness bug in Openwall gen_salt code that pgcrypto uses.
This makes the salt space for md5 and xdes algorithms a lot smaller than
it should be.

Marko Kreen
2006-01-03 23:46:24 +00:00
Joe Conway 925952603d When the remote query result has a different number of columns
than the local query specifies (e.g. in the FROM clause),
throw an ERROR (instead of crashing). Fix for bug #2129 reported
by Akio Iwaasa.
2006-01-03 23:45:52 +00:00
Teodor Sigaev 7ac8a4be89 Multibyte encodings support for ISpell dictionary 2005-12-21 13:05:49 +00:00
Teodor Sigaev cb4ea994c6 Improve support of multibyte encoding:
- tsvector_(in|out)
- tsquery_(in|out)
- to_tsvector
- to_tsquery, plainto_tsquery
- 'simple' dictionary
2005-12-12 11:10:12 +00:00
Tom Lane 69525fc0ef Remove incorrect increment of lineno, per David Fetter.
Sync HEAD and 8.1 branches of pgbench.
2005-12-10 01:09:07 +00:00
Peter Eisentraut a29c04a541 Allow installation into directories containing spaces in the name. 2005-12-09 21:19:36 +00:00