Commit Graph

1110 Commits

Author SHA1 Message Date
Bruce Momjian 0f7a2a5fbe Create temporary files securely. 2004-11-03 22:46:15 +00:00
Neil Conway feac3364ed Trivial fixes for English grammar in contrib/btree_gist and contrib/rtree_gist
documentation.
2004-11-01 11:11:13 +00:00
Tom Lane fe2bfa6332 This makes dblink pass its installcheck test on platforms where
snprintf(data, len, %s, NULL) crash.

The code was trying to find a connection by name when it already had an
unnamed connection and did not have a name to search with.

Kris Jurka
2004-10-28 22:31:11 +00:00
Tom Lane 0636d55843 Fix some more 'old-style parameter declaration' warnings. 2004-10-25 02:30:29 +00:00
Tom Lane f1283ed6cc Fix a bunch of 'old-style parameter declaration' warnings induced by
writing 'foo()' rather than 'foo(void)'.
2004-10-25 02:15:02 +00:00
Neil Conway 8ec05b28b7 Modify hash_create() to elog(ERROR) if an error occurs, rather than
returning a NULL pointer (some callers remembered to check the return
value, but some did not -- it is safer to just bail out).

Also, cleanup pgstat.c to use elog(ERROR) rather than elog(LOG) followed
by exit().
2004-10-25 00:46:43 +00:00
Tom Lane 7e89f63c46 Add comparison file for exp-three-digits formatting. 2004-10-24 22:11:37 +00:00
Tom Lane 0f845a9f09 Add comparison file for exp-three-digits formatting. 2004-10-24 21:54:57 +00:00
Tom Lane a1f585139b Replace ad-hoc atof() code with call to float4in, per Andrew Dunstan. 2004-10-24 21:47:07 +00:00
Tom Lane 3fdd33ab99 Avoid macro-redefinition warnings on Windows, per Andrew Dunstan. 2004-10-21 19:49:27 +00:00
Tom Lane 380bd04c16 Standardize on using the Min, Max, and Abs macros that are in our c.h file,
getting rid of numerous ad-hoc versions that have popped up in various
places.  Shortens code and avoids conflict with Windows min() and max()
macros.
2004-10-21 19:28:36 +00:00
Tom Lane a171fc1a4f Use temp files in current directory, not /tmp, to reduce security risk
while running this script.
2004-10-20 16:42:46 +00:00
Tom Lane d3e36da789 Make the standard stopword files be sought relative to share_dir, so
that a tsearch2 installation can be relocatable.
2004-10-17 23:09:31 +00:00
Tom Lane b3d58ea7ec Include dllist.c directly instead of assuming that libpq will provide it.
Whack some semblance of project-conventions-conformance into pg_autovacuum.h.
2004-10-16 21:50:02 +00:00
Tom Lane 9ffc8ed58b Repair possible failure to update hint bits back to disk, per
http://archives.postgresql.org/pgsql-hackers/2004-10/msg00464.php.
This fix is intended to be permanent: it moves the responsibility for
calling SetBufferCommitInfoNeedsSave() into the tqual.c routines,
eliminating the requirement for callers to test whether t_infomask changed.
Also, tighten validity checking on buffer IDs in bufmgr.c --- several
routines were paranoid about out-of-range shared buffer numbers but not
about out-of-range local ones, which seems a tad pointless.
2004-10-15 22:40:29 +00:00
Neil Conway 04a1a24e9c Cleanup some unnecessary void * casts when using pfree() in contrib/xml
and contrib/xml2
2004-10-13 01:26:42 +00:00
Tom Lane 1bef379d08 Update reference to pgsql-server. 2004-10-12 01:49:48 +00:00
Bruce Momjian a5d7ba773d Adjust comments previously moved to column 1 by pgident. 2004-10-07 15:21:58 +00:00
Neil Conway 125bb6cee4 Pickup fix from upstream OpenBSD sources: mark a read-only local array as
"static" to reduce size of generated code slightly.
2004-10-05 00:14:45 +00:00
Tom Lane 1b7f214071 Refer to ll_to_earth() function by its actual name. 2004-10-04 22:52:47 +00:00
Tom Lane c8196c87a7 Adjust postmaster to recognize that a lockfile containing its parent's PID
must be stale.  Tweak example startup scripts to not use pg_ctl but launch
the postmaster directly, thereby ensuring that only the postmaster's direct
parent shell will be a postgres-owned process.  In combination these should
fix the longstanding problem of the postmaster sometimes refusing to start
during reboot because it thinks the old lockfile is not stale.
2004-10-01 18:30:25 +00:00
Tom Lane 392b187a21 Remove DROPs from contrib object creation scripts, per Dave Page. 2004-10-01 15:43:40 +00:00
Tom Lane d674884306 Add variant regression file to handle machines that convert -1e-700
to minus zero rather than zero; this includes at least Mac OS X 10.3
and Solaris 2.8.
2004-09-30 21:12:45 +00:00
Tom Lane d9b68c8061 Code review for recent dbsize changes. Fix some thinkos, enforce coding
style and message style standards, improve documentation.
2004-09-28 19:35:43 +00:00
Tom Lane f7332e88b9 Remove duplicate PQclear(res) operations leading to double free() and
subsequent core dump.  It looks like at one time DBLINK_RES_ERROR_AS_NOTICE
didn't include a PQclear, but now it does and so these other ones are
duplicate.
2004-09-28 00:49:04 +00:00
Tom Lane 0428840864 Here is a patch bringing oid2name into the 21st century.
Alvaro Herrera
2004-09-17 21:14:19 +00:00
Tom Lane 914e177a3e Remove contrib/pg_logger, per recent discussion. 2004-09-16 21:20:20 +00:00
Tom Lane db64df4b1c Fix contrib/cube and contrib/seg to compile on Windows.
Andreas Pflug
2004-09-14 04:21:38 +00:00
Tom Lane 92244e8e54 Fix some minor issues with the new Win32 service code for autovacuum,
and add documentation.  Dave Page
2004-09-14 04:06:20 +00:00
Tom Lane b04e70b11e Adjust tsearch2.sql to avoid use of COPY FROM STDIN, so as to
simplify life for the Win32 installer.  Per Dave Page.
2004-09-14 03:58:54 +00:00
Tom Lane 4f7d3e0faf Win32 compile fix for misc_utils.
Claudio Natoli
2004-09-14 03:50:17 +00:00
Tom Lane bf06825e31 Win32 compile fixes for pgbench, pgcrypto, and tsearch.
Claudio Natoli
2004-09-14 03:39:55 +00:00
Tom Lane fc564686a7 Fix contrib/dbase to compile under Win32. Laurent Ballester 2004-09-14 03:28:28 +00:00
Tom Lane b2c4071299 Redesign query-snapshot timing so that volatile functions in READ COMMITTED
mode see a fresh snapshot for each command in the function, rather than
using the latest interactive command's snapshot.  Also, suppress fresh
snapshots as well as CommandCounterIncrement inside STABLE and IMMUTABLE
functions, instead using the snapshot taken for the most closely nested
regular query.  (This behavior is only sane for read-only functions, so
the patch also enforces that such functions contain only SELECT commands.)
As per my proposal of 6-Sep-2004; I note that I floated essentially the
same proposal on 19-Jun-2002, but that discussion tailed off without any
action.  Since 8.0 seems like the right place to be taking possibly
nontrivial backwards compatibility hits, let's get it done now.
2004-09-13 20:10:13 +00:00
Neil Conway bc4911bb43 Fix two typos in comments. 2004-09-10 04:36:42 +00:00
Neil Conway 87438cb90e Apply patch from Steven Singer for contrib/dbmirror. Changes:
-It fixes up some bugs with handling setval calls
-Adds upgrade instructions from prior versions
-Improved the sample config file
-Fixed some things in the clean_pending script
2004-09-10 04:31:06 +00:00
Bruce Momjian cef30c650b Improve README with mention of new functions. 2004-09-08 19:35:33 +00:00
Tom Lane 3475fd1178 Fix ancient declaration inconsistency in cube & seg ... came across a
compiler that warns about it.
2004-09-02 20:53:42 +00:00
Bruce Momjian baace400c7 Remove line specifying Andreas as author. 2004-09-02 04:04:04 +00:00
Bruce Momjian 528ac10c7c The current implementation of dbsize doesn't handle tables in
tablespaces correctly, and is quite restricted on objects covered (only
tables and databases, but not tablespaces and indexes).

The attached patch contributes:

- database_size(name)
- relation_size(text)
These are the well-known functions, tablespace-aware.

- pg_tablespace_size(oid)
- pg_database_size(oid)
- pg_relation_size(oid)
Tablespace-aware implementations, used by the upper functions.
pg_relation_size will report sizes of indexes as well.

- pg_size_pretty(bigint)
Formatting of sizes, to display '146MB' instead of '152885668'

Andreas Pflug
2004-09-02 00:55:22 +00:00
Bruce Momjian 3afd7eaffd Add Win32 service capability to pg_autovacuum.
Dave Page
2004-08-30 03:31:29 +00:00
Bruce Momjian 15d3f9f6b7 Another pgindent run with lib typedefs added. 2004-08-30 02:54:42 +00:00
Tom Lane b83e592671 Replace bcopy by memmove for more portability. 2004-08-29 16:43:05 +00:00
Bruce Momjian b6b71b85bc Pgindent run for 8.0. 2004-08-29 05:07:03 +00:00
Bruce Momjian da9a8649d8 Update copyright to 2004. 2004-08-29 04:13:13 +00:00
Tom Lane d77f74fa7e Remove contrib/rserv, since there are better replication solutions
available elsewhere (including a descendant project on gborg).
2004-08-28 21:36:25 +00:00
Tom Lane 1785acebf2 Introduce local hash table for lock state, as per recent proposal.
PROCLOCK structs in shared memory now have only a bitmask for held
locks, rather than counts (making them 40 bytes smaller, which is a
good thing).  Multiple locks within a transaction are counted in the
local hash table instead, and we have provision for tracking which
ResourceOwner each count belongs to.  Solves recently reported problem
with memory leakage within long transactions.
2004-08-27 17:07:42 +00:00
Tom Lane 3bd726333c Recent tightening of allowed array-literal syntax broke one test case
in contrib/ltree.  Fix.
2004-08-21 00:26:54 +00:00
Tom Lane 86d78021a4 Whack btree_gist code around until it has some small hope of building
on non-gcc compilers.
2004-08-21 00:09:10 +00:00
Bruce Momjian ee85595d46 > Please find enclose a submission to fix these problems.
>
> The patch adds missing the "libpgport.a" file to the installation under
> "install-all-headers". It is needed by some contribs. I install the
> library in "pkglibdir", but I was wondering whether it should be "libdir"?
> I was wondering also whether it would make sense to have a "libpgport.so"?
>
> It fixes various macros which are used by contrib makefiles, especially
> libpq_*dir and LDFLAGS when used under PGXS. It seems to me that they are
> needed to
>
> It adds the ability to test and use PGXS with contribs, with "make
> USE_PGXS=1". Without the macro, this is exactly as before, there should be
> no difference, esp. wrt the vpath feature that seemed broken by previous
> submission. So it should not harm anybody, and it is useful at least to me.
>
> It fixes some inconsistencies in various contrib makefiles
> (useless override, ":=" instead of "=").

Fabien COELHO
2004-08-20 20:13:10 +00:00
Bruce Momjian b43fd16eec I notice that contrib/fuzzystrmatch/dmetaphone.c doesn't compile cleanly
as it stands - it mixes declarations in code, C++-style. The attached
patch shifts declarations to the tops of functions and enables this file
to compile cleanly as C.

Richard Poole
2004-08-20 19:48:14 +00:00
Bruce Momjian 676bb9a6b4 dbsize modification to support tablespaces
Gavin Sherry
2004-08-12 19:18:05 +00:00
Joe Conway bc8a1fc282 Hashed crosstab was dying with an SPI_finish error when the source SQL
produced no rows. Now it returns 0 rows instead. Adjusted regression
test for this case.
2004-08-11 00:49:35 +00:00
Tom Lane fcbc438727 Label CVS tip as 8.0devel instead of 7.5devel. Adjust various comments
and documentation to reference 8.0 instead of 7.5.
2004-08-04 21:34:35 +00:00
Tom Lane e84c71b4e6 Update oidjoins regression test to match current catalog structure. 2004-08-04 20:33:49 +00:00
Peter Eisentraut adf57cd7e2 PostgreSQL extension makefile framework ("pgxs"), by Fabien Coelho, with
some massaging by Peter Eisentraut.  This is basically a simple
generalization of the existing contrib makefiles.
2004-07-30 12:26:40 +00:00
Tom Lane fe548629c5 Invent ResourceOwner mechanism as per my recent proposal, and use it to
keep track of portal-related resources separately from transaction-related
resources.  This allows cursors to work in a somewhat sane fashion with
nested transactions.  For now, cursor behavior is non-subtransactional,
that is a cursor's state does not roll back if you abort a subtransaction
that fetched from the cursor.  We might want to change that later.
2004-07-17 03:32:14 +00:00
Bruce Momjian 14755f87ee Properly order mysql links. 2004-07-15 18:53:44 +00:00
Peter Eisentraut 8b6f76af46 Make installation instructions match reality. 2004-07-12 22:12:34 +00:00
Bruce Momjian d7c89ea9b2 Update URL's for mysql conversion tools. 2004-07-11 22:52:18 +00:00
Tom Lane 959b353db2 Fix misspellings: langauge -> language. 2004-07-04 23:34:24 +00:00
Joe Conway cd4fd672dd Attached is a 1 line bug fix for dbmirror that was submitted.
It fixes a bug where some transactions could be dropped when writing
mirrored SQL statements to files.
-- Steven Singer
2004-07-02 00:58:09 +00:00
Joe Conway 13629df5a1 Add double metaphone code from Andrew Dunstan. Also change metaphone so that
an empty input string causes an empty output string to be returned, instead of
throwing an ERROR -- per complaint from Aaron Hillegass, and consistent with
double metaphone. Fix examples in README.soundex pointed out by James Robinson.
2004-07-01 03:25:48 +00:00
Tom Lane 573a71a5da Nested transactions. There is still much left to do, especially on the
performance front, but with feature freeze upon us I think it's time to
drive a stake in the ground and say that this will be in 7.5.

Alvaro Herrera, with some help from Tom Lane.
2004-07-01 00:52:04 +00:00
Teodor Sigaev bb89237531 1 Eliminate duplicate field HLWORD->skip
2 Rework support for html tags in parser
3 add HighlightAll to headline function for generating highlighted
  whole text with saved html tags
2004-06-28 16:19:09 +00:00
Teodor Sigaev df9d87f608 Previous commit wasnt full... 2004-06-23 11:29:58 +00:00
Teodor Sigaev de55c0cef6 1 Fix affixes with void replacement (AFAIK, it's only russian)
2 Optimize regex execution
2004-06-23 11:06:11 +00:00
Teodor Sigaev 09bc52fe73 Fix stupid bug in installcheck 2004-06-23 09:43:43 +00:00
Tatsuo Ishii 2990b8a4a6 Add missing PQclear(). 2004-06-14 11:00:12 +00:00
Tom Lane 83db69bebc Now needs to include <ctype.h>. 2004-06-12 20:31:43 +00:00
Teodor Sigaev e25a6e185b Remove asymetrical word processing in query and text 2004-06-07 16:48:18 +00:00
Teodor Sigaev 7b81988f9b - Add aligment of variable data types
- Add aligment for interval data types
- Avoid floating point overflow in penalty functions
Janko Richter <jankorichter@yahoo.de> and teodor
2004-06-03 12:26:10 +00:00
Teodor Sigaev f35e8d8431 Fix silly bug 2004-06-01 10:24:25 +00:00
Tom Lane aad4196764 List pg_trgm in contrib Makefile and README. 2004-06-01 05:15:47 +00:00
Teodor Sigaev cbfa4092bb trgm - Trigram matching for PostgreSQL
--------------------------------------

	The pg_trgm contrib module provides functions and index classes
	for determining the similarity of text based on trigram
	matching.
2004-05-31 17:18:12 +00:00
Teodor Sigaev 553bc41633 1 add namespaces as Tom suggest http://www.pgsql.ru/db/mw/msg.html?mid=1987703
2 remove select qeury in inserts
2004-05-31 16:51:56 +00:00
Teodor Sigaev 7cb55d21ed Fix memory leak with pg_regexec 2004-05-31 13:55:19 +00:00
Teodor Sigaev d222bb4d5e Fix memory leak with pg_regcomp 2004-05-31 13:52:57 +00:00
Teodor Sigaev 11864ab657 Win32 related patch by Darko Prenosil. Small correct by teodor 2004-05-31 13:29:43 +00:00
Neil Conway 72b6ad6313 Use the new List API function names throughout the backend, and disable the
list compatibility API by default. While doing this, I decided to keep
the llast() macro around and introduce llast_int() and llast_oid() variants.
2004-05-30 23:40:41 +00:00
Teodor Sigaev a6ea6457fa Stat function now can show statistics per weight of lexemes 2004-05-28 15:36:49 +00:00
Teodor Sigaev 42d069886f 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 2004-05-28 10:43:32 +00:00
Bruce Momjian b5cf1b6a21 Fix problems in pg_autovacuum:
1) temp table crash

2) Check send_query() function call return value.

Backpatch to 7.4.X.
2004-05-26 18:48:25 +00:00
Jan Wieck 18d0d10563 Please apply this minor patch to the cvs HEAD of dbmirror
It fixes a typo in a define

Thanks


-- Steven Singer
2004-05-26 00:08:26 +00:00
PostgreSQL Daemon a551c3d0f5 attempt at a multi file commit, to seee how it formats 2004-05-20 22:54:19 +00:00
PostgreSQL Daemon ee20fd4621 just testing activitymail ... only added a space here so that the commit would
pick it up
2004-05-20 22:44:16 +00:00
Teodor Sigaev 89a8e15671 Update docs from Andrew J. Kopciuch <akopciuch@bddf.ca> 2004-05-14 10:39:25 +00:00
Tom Lane 4af3421161 Get rid of rd_nblocks field in relcache entries. Turns out this was
costing us lots more to maintain than it was worth.  On shared tables
it was of exactly zero benefit because we couldn't trust it to be
up to date.  On temp tables it sometimes saved an lseek, but not often
enough to be worth getting excited about.  And the real problem was that
we forced an lseek on every relcache flush in order to update the field.
So all in all it seems best to lose the complexity.
2004-05-08 19:09:25 +00:00
Tom Lane a90b2a035f Suppress 'uninitialized variable' warning emitted by some (not all)
versions of gcc.  The code is correct AFAICS, but it requires slightly
more analysis than usual to see that the variable can't be used uninitialized.
2004-05-07 13:09:12 +00:00
Teodor Sigaev d1eb9fede5 Use regprocedure type instead of oid. Usefull for human read and dump/restore 2004-05-07 11:19:06 +00:00
Tom Lane 0bd61548ab Solve the 'Turkish problem' with undesirable locale behavior for case
conversion of basic ASCII letters.  Remove all uses of strcasecmp and
strncasecmp in favor of new functions pg_strcasecmp and pg_strncasecmp;
remove most but not all direct uses of toupper and tolower in favor of
pg_toupper and pg_tolower.  These functions use the same notions of
case folding already developed for identifier case conversion.  I left
the straight locale-based folding in place for situations where we are
just manipulating user data and not trying to match it to built-in
strings --- for example, the SQL upper() function is still locale
dependent.  Perhaps this will prove not to be what's wanted, but at
the moment we can initdb and pass regression tests in Turkish locale.
2004-05-07 00:24:59 +00:00
Bruce Momjian a4d9d3e028 Attached is are a few small fixes for dbmirror.
1. Fixed bug where sequences were being mirrored incorrectly if they
exceeded 127
2. Fixed a bug in the perl script with mirroring sequences(John
Burtenshaw sent an email to patches describing the bug in March but I
htink he forgot to attach his patch)
3. The dates/times in the transaction files will always use 2 digits.

Steven Singer
2004-04-22 03:48:38 +00:00
Bruce Momjian 8f73bbae85 Update mention of diff. 2004-04-19 23:19:02 +00:00
Bruce Momjian 13b63d3764 Update to my2pg version 1.28, add docs, update URL for newest version.
Create diff of custom changes Tom made to the utility for CREATE
FUNCTION.

This will make moving this utility out of CVS easier.
2004-04-19 23:18:12 +00:00
Bruce Momjian 085fa8ac48 Update to my2pg 1.28, from:
http://www.omnistarinc.com/~fonin/downloads.php#my2pg
2004-04-19 23:11:49 +00:00
Bruce Momjian 1ad590541d The attached patch for contrib/pg_autovacuum/README.pg_autovacuum fixes
one apparent error and makes a minor stylistic change that makes it more
consistent and makes clear something that confused me :-)

Andrew Dunstan
2004-04-19 21:30:18 +00:00
Tom Lane 89ee5b89a6 Fix some more compatibility issues (ctype.h macros must never be passed
signed chars...)
2004-04-02 00:41:18 +00:00
Tom Lane 47fe0517fc Fix some portability issues (reliance on gcc-isms). 2004-04-01 23:44:38 +00:00
Tom Lane 51d1a12ed1 Fix portability issues with functions that don't match their declaration. 2004-04-01 23:35:35 +00:00
Tom Lane 375369acd1 Replace TupleTableSlot convention for whole-row variables and function
results with tuples as ordinary varlena Datums.  This commit does not
in itself do much for us, except eliminate the horrid memory leak
associated with evaluation of whole-row variables.  However, it lays the
groundwork for allowing composite types as table columns, and perhaps
some other useful features as well.  Per my proposal of a few days ago.
2004-04-01 21:28:47 +00:00
Teodor Sigaev f2c064afcb Cleanup vectors of GISTENTRY and eliminate problem with 64-bit strict-aligned
boxes. Change interface to user-defined GiST support methods union and
picksplit. Now instead of bytea struct it used special GistEntryVector
structure.
2004-03-30 15:45:33 +00:00
Teodor Sigaev eebdfcdbe6 1 Minimize memory allocation for void (but not null) value.
2 Add silly ordering for ts_vector to aim grouping, union, except etc. Don't use BTree opclass (tsvector_ops).
2004-03-25 16:56:10 +00:00
Tom Lane d81cd7032e Standardize output buffer size and display format for strftime;
followup to complaint from Korean User's Group.
2004-03-22 15:34:22 +00:00
Bruce Momjian 2678395928 In working through a pg_autovacuum problem with Joe Conway (which turned
out to be the same problem reported by Cott Lang which the previous
patch resolved) a new bug was uncovered when running with a debug level
of greater than 1.

This patch resolves this new found bug and fixes some of the other
debugging output to be more consistent.

Please apply to both HEAD and the 7.4 branch.


Matthew T. O'Connor
2004-03-22 03:57:08 +00:00
Bruce Momjian 7b6fba9d06 Handle OID's and unsigned values better in pg_autovacuum.
Matthew T. O'Connor
2004-03-15 16:17:30 +00:00
Tom Lane 1bc2d544b9 Localize our dependencies on the way to create NAN or INFINITY.
Per recent proposal to pghackers.
2004-03-15 03:29:22 +00:00
Bruce Momjian 181d4d410a Rename README's to match directory names. Mention copyright matches
PostgreSQL's.
2004-03-14 03:19:13 +00:00
Bruce Momjian af96aa9ab1 I wanted to submit some changes to the bundled postgres startup
script for Mac OS X. I added calls to utilize the bundled apache
rotatelogs script in the DB startup for log rotation. Also modified
startup parameters file to allow using the "SystemStarter" utility to
start/stop/restart postgres with a rotating log file.

The script credits David Wheeler, 2002. I wrote him a message about
the changes an he suggested I post them here. I explain some of the
changes below.

Not sure how to submit the changes. I have 3 files, "PostgreSQL"
script, "StartupParameters.plist" file, "pg_startupscript.diff" file.
The diff file was run against the original "PostgreSQL" script file.
I'll try attaching them to this message. If they get filtered I can
resend if needed.

Thanks.

Ray A.


------------------------------------

1) Changed the "Provides" parameter in StartupParameters.plist to
"PostgreSQL" from "postgres database" simply for ease of typing. It
seems that the SystemStarter utility uses the "Provides" value if you
want to control the script. This way I did not have to enclose it in
quotes on commandline. The modified StartupParameters.plist is now an
XML document also.


2) For the startup script I added 2 user modifiable variables:

# do you want to rotate the log files, 1=true 0=false
ROTATELOGS=1

# logfile rotate in seconds
ROTATESEC="604800"

I also added a non modifiable variable:

# The apache log rotation utility
LOGUTIL="/usr/sbin/rotatelogs"

I modified the StartService and RestartService functions to execute
the new commands if the user wants log rotation.

Ray Aspeitia
2004-03-09 01:59:13 +00:00
Neil Conway bab4269b95 contrib/xml2 updates from John Gray:
I have changed the name of the new parse function to xml_valid and fixed
a reference to SortMem which meant that the code as supplied would work
against 7.3 and 7.4 but wouldn't work in CVS.
2004-03-07 20:41:27 +00:00
Joe Conway 6a1e2b3c28 Added new versions of dblink, dblink_exec, dblink_open, dblink_close,
and, dblink_fetch -- allows ERROR on remote side of connection to
throw NOTICE locally instead of ERROR. Also removed documentation for
previously deprecated, now removed, functions.
2004-03-07 02:27:00 +00:00
Bruce Momjian 3f01eba0bf Have makefile reference /xml2. 2004-03-05 20:01:46 +00:00
Bruce Momjian 3783ed3420 Add xml2 as skipped /contrib Makefile entry. 2004-03-05 05:15:16 +00:00
Bruce Momjian e085999662 Add mention xml2 is a newer version. 2004-03-05 04:13:15 +00:00
Bruce Momjian 614e42354d Add missing xml files. 2004-03-05 04:10:11 +00:00
Bruce Momjian 31f4b59a46 Move new version of contrib/ xml into xml2, keep old version in /xml. 2004-03-05 03:57:58 +00:00
Bruce Momjian adca025c9e Thanks to the generous support of Torchbox (http://www.torchbox.com), I
have been able to significantly improve the contrib/xml XPath
integration code.

New features:

* XPath set-returning function allows multiple results from an several
XPath queries to be used as a virtual table.
* Using libxslt, XSLT transformations (with and without parameters) are
supported. (Caution: This support allows generic URL fetching from
within the backend as well).

I've removed the old code so that it is all libxml based. Rather than
attach as a patch, I've put the tar.gz (10k!) at
http://www.azuli.co.uk/pgxml-1.0.tar.gz
(all files in archive are xml/....).

I think this is worth replacing the contrib version with, even though
the function names have changed (though the same functionality is
there), because it includes a SRF and some SPI usage, in addition to
linking to an external library. And it isn't a big module! Obviously, I
understand that people might prefer to move it elsewhere, or might have
reservations about replacing an existing contrib module with an
incompatible one. I'm open to suggestions.

John Gray
2004-03-05 03:24:50 +00:00
Bruce Momjian 53c1f64b29 Seems the usage message for oid2name calls it pg_oid2name. Fixed. 2004-03-03 14:24:12 +00:00
Tom Lane fa96a5e15b Add %option nodefault to all our flex lexers. Fix a couple of rule gaps
exposed thereby.  AFAICT these would not lead to any worse problems than
junk emitted on the backend's stdout, but we should have the option to
catch possible worse errors in future.
2004-02-24 22:06:32 +00:00
Joe Conway 3cd8411826 When returning type "record", replace use of pgresultGetTupleDesc
with ReturnSetInfo->expectedDesc. This allows custom datatypes
(e.g. from tsearch2) to be returned at runtime. Previous behavior
depended on the type oid to match between the remote and local
database, which obviously doesn't work well for custom types.
Per report from Mark Gibson.
2004-02-24 06:07:18 +00:00
Joe Conway 64a2e1fdef Apply quote_literal to the start_with argument of connectby. Fixes problem
reported by David Garamond when working with bytea parent and child keys.
2004-02-24 05:25:36 +00:00
Tom Lane 7a57a67278 Replace opendir/closedir calls throughout the backend with AllocateDir
and FreeDir routines modeled on the existing AllocateFile/FreeFile.
Like the latter, these routines will avoid failing on EMFILE/ENFILE
conditions whenever possible, and will prevent leakage of directory
descriptors if an elog() occurs while one is open.
Also, reduce PANIC to ERROR in MoveOfflineLogs() --- this is not
critical code and there is no reason to force a DB restart on failure.
All per recent trouble report from Olivier Hubaut.
2004-02-23 23:03:10 +00:00
Bruce Momjian 1d567aee07 The following bug has been logged online:
Bug reference:      1081
Logged by:          Aarjav Trivedi

Email address:      aarjav@cc.gatech.edu

PostgreSQL version: 7.4

Operating system:   Linux

Description:        Spelling error in tsearch2.sql leading to problems
with
tsearch

Details:

On line 620 of tsearch2.sql which is required to install and run
TSEARCH,

REATE FUNCTION tsstat_in(cstring)

should be

CREATE FUNCTION tsstat_in(cstring)

because of this error, TSEARCH fails to work as specified,
2004-02-20 20:42:29 +00:00
Bruce Momjian 51b363ec24 Please apply this patch to contrib/dbmirror
In incorperates changes from myself and a number of contributors.

This update to dbmirror provides:

-replication of sequence operations via setval/nextval
-DBMirror.pl support for logging to syslog
-changed the names of the tables to dbmirror_*  (no quotes required)
-Support for writitng SQL statements to files instead of directly to
 a slave database
-More options for DBMirror.pl in the config files.

Steven Singer
2004-02-17 03:34:35 +00:00
Tom Lane 391c3811a2 Rename SortMem and VacuumMem to work_mem and maintenance_work_mem.
Make btree index creation and initial validation of foreign-key constraints
use maintenance_work_mem rather than work_mem as their memory limit.
Add some code to guc.c to allow these variables to be referenced by their
old names in SHOW and SET commands, for backwards compatibility.
2004-02-03 17:34:04 +00:00
Teodor Sigaev 146aab497e Docs fix from Kris Jurka <books@ejurka.com> 2004-01-26 15:08:52 +00:00
Teodor Sigaev 239760209b Correct type for isalnum 2004-01-19 18:39:45 +00:00
Tom Lane 5390e284db Remove broken (and unnecessary) definition of operator <> for _int4
datatype; the generic array comparators added in 7.4 supersede this.
Per report and patch from Korea PostgreSQL Users' Group.
2004-01-08 23:40:27 +00:00
Tom Lane 2cdace962b Remove incorrect remark about having to restart backend to load a new
version of a shared library.
2003-12-27 18:20:18 +00:00
Teodor Sigaev 125d69cd9b Fix signed char in comparison and check memory allocation 2003-12-18 19:27:53 +00:00
Tom Lane a7e383d241 Repair badly broken estimation of output buffer size in lquery_out(). 2003-12-17 20:15:41 +00:00
Teodor Sigaev 565dc5d1ae Fix integer types to use definition from c.h. Per bug report by Patrick Boulay <patrick.boulay@medrium.com> 2003-12-10 15:54:58 +00:00
Tom Lane ee719299e4 Minor autovacuum fixes from Matthew O'Connor. 2003-12-08 21:54:00 +00:00
Tom Lane 1b5a2dbdff Add fflush() before sleeping, per Matthew O'Connor. 2003-12-08 21:51:31 +00:00
Tom Lane 9c26980f58 Replace unportable and overflow-prone use of 'long long' with safer
'double' arithmetic, per recent discussion.
2003-12-07 19:55:58 +00:00
Teodor Sigaev a5a68766e1 One more fix confusion 2003-12-05 15:37:51 +00:00
Teodor Sigaev 8f678600c2 Avoid confusion start_parse_str function with tsearch V1 2003-12-05 14:27:42 +00:00
Teodor Sigaev 6de3fe3c0d Avoid conflict strndup with glibc 2003-12-04 12:21:11 +00:00
Teodor Sigaev 32580efafb Fix for word with several infinitives 2003-12-03 16:07:48 +00:00
Bruce Momjian ea4b9f14f3 I've run across a pretty serious problem with pg_autovacuum.
pg_autovacuum looses track of any table that's ever been truncated
(possibly other situations too).   When i truncate a table it gets a
new relfilenode in pg_class.  This is a problem because pg_autovacuum
assumes pg_class.relfilenode will join to pg_stats_all_tables.relid.
pg_stats_all_tables.relid is actallly the oid from pg_class, not the
relfilenode.   These two values start out equal so pg_autovacuum works
initially, but it fails later on because of this incorrect assumption.

This patch fixes that problem.  Applied to HEAD and 7.4.X.

Brian Hirt
2003-12-01 23:19:33 +00:00
Bruce Momjian 15b5d6cfc6 I noticed in the 7.4 release that in contrib/pg_autovacuum, args->logfile is
not initialized if a log file is not specified on the command line.  This
causes an immediate segfault on systems that fill allocated memory with some
value other than zero (my FreeBSD machine uses 0xD0).

Several crashes later I discovered that args->user, password, host, and port
are also used without being initialized.

This doesn't appear to be fixed in CVS and I came up empty on a mailing list
search -- hope it hasn't been reported already.

Craig Boston
2003-12-01 23:13:07 +00:00
PostgreSQL Daemon 55b113257c make sure the $Id tags are converted to $PostgreSQL as well ... 2003-11-29 22:41:33 +00:00
PostgreSQL Daemon 969685ad44 $Header: -> $PostgreSQL Changes ... 2003-11-29 19:52:15 +00:00
Teodor Sigaev cabdf460d3 Fix free instead of pfree 2003-11-28 12:09:02 +00:00
Joe Conway d1824a5ccb Fix regression in dblink_disconnect() reported by Eduardo Stern:
persistent_conn was left dangling after a disconnect in the
unnamed connection case, causing a subsequent disconnect to
crash the backend.
2003-11-28 05:03:02 +00:00
Teodor Sigaev baeab89de6 Fixes about word with several infiniteve 2003-11-27 16:04:40 +00:00
Joe Conway 5392e73b6c Added missing SPI_finish() calls to get_tuple_of_interest(). Fixes bug
reported by Andrea Grassi.
2003-11-26 20:43:25 +00:00
Teodor Sigaev f5e8bfb4b1 Utility for convert myspell dictionaries to ispell, full README will be later 2003-11-26 14:06:16 +00:00
Tatsuo Ishii 43f77c06bb Patches from Yutaka Tanida. Create primary key indexes after data
insertion to reduce initialization time.
2003-11-26 06:53:18 +00:00
Teodor Sigaev 4ca765f9aa Ignore too long lexeme 2003-11-25 13:33:15 +00:00
Teodor Sigaev c63c1946a2 Optimize. Improve ispell support for compound words. This work was sponsored by ABC Startsiden AS. 2003-11-17 17:34:35 +00:00
Tom Lane fa5c8a055a Cross-data-type comparisons are now indexable by btrees, pursuant to my
pghackers proposal of 8-Nov.  All the existing cross-type comparison
operators (int2/int4/int8 and float4/float8) have appropriate support.
The original proposal of storing the right-hand-side datatype as part of
the primary key for pg_amop and pg_amproc got modified a bit in the event;
it is easier to store zero as the 'default' case and only store a nonzero
when the operator is actually cross-type.  Along the way, remove the
long-since-defunct bigbox_ops operator class.
2003-11-12 21:15:59 +00:00
Bruce Momjian f719f0f6db Typo fix in comment from David Wheeler 2003-11-12 03:27:26 +00:00
Tom Lane c1d62bfd00 Add operator strategy and comparison-value datatype fields to ScanKey.
Remove the 'strategy map' code, which was a large amount of mechanism
that no longer had any use except reverse-mapping from procedure OID to
strategy number.  Passing the strategy number to the index AM in the
first place is simpler and faster.
This is a preliminary step in planned support for cross-datatype index
operations.  I'm committing it now since the ScanKeyEntryInitialize()
API change touches quite a lot of files, and I want to commit those
changes before the tree drifts under me.
2003-11-09 21:30:38 +00:00
Bruce Momjian 6479ee28c0 Fix typo on autovacuum readme. 2003-11-09 03:15:46 +00:00
Bruce Momjian e781a1a95d Here is an update to the dbmirror README file.
-References to older versions of PostgreSQL have been removed(It no
longer
compiles against older versions)
-Added a link to PgPerl at GBorg.

Steven Singer
2003-10-27 02:52:45 +00:00
Tom Lane 5319ba3803 Update README file to show 7.4 oidjoins relationships. The regression
test was updated previously, but documentation is lagging.
2003-10-19 22:15:32 +00:00
Bruce Momjian 62fdc3dd60 I have run pg_autovacuum on AIX, so that can, at least loosely, be
considered "tested."

And I have turned all of the 7.4 HISTORY material into DocBook for
release.sgml

Christopher Browne
2003-10-16 03:47:28 +00:00
Bruce Momjian 18e5addb96 Fix core dump on root starting pg_autovacuum.
Change conditionals to be more constent with our code

if (const == var) => if (var == const).
2003-10-10 19:26:25 +00:00
Bruce Momjian 1dad866bb4 Someone report me small bug in contrib/pg_dumplo today. It's problem
with a little dirty snprintf() usage which I used some years ago:

    snprintf(path, BUFSIZ, "%s/lo_dump.index", path);

Karel Zak
2003-10-09 13:38:05 +00:00
Bruce Momjian 7ceadb8fab Change some awkward wording in the pg_autovacuum README file. I really
only read this because of Niel :-)

Robert Treat
2003-10-08 18:18:04 +00:00
Tom Lane 08c33c426b Attached is a patch for contrib/tablefunc. It fixes two issues raised by
Lars Boegild Thomsen (full email below) and also corrects the regression
expected output for a recent backend message adjustment. Please apply.

Joe Conway
2003-10-02 03:51:40 +00:00
Bruce Momjian 6000e32805 I've not changed any malloc/calloc to palloc. It looks to me that these memory
areas are for the lifetime of the backend and in the interests of not breaking
something that's not broken I left alone.

Note for anyone reading this and wanting it for tsearch-v2-stable (i.e. for 7.3
backend) this patch probably will not apply cleanly to that source. It should
be simple enough to see what's going on and apply the changes by hand if need
be.


--
Nigel J. Andrews
2003-09-29 18:54:38 +00:00
Bruce Momjian 04e401f97f A) Fixes a bug that prevented mirroring of data on a table that has had
a column dropped.

B) Updated the documentation for the 7.4 release.

Steven Singer
2003-09-29 18:16:48 +00:00
Bruce Momjian 44f8c5c10a Make dbf2pg safe for non-ASCII character sets.
M?rcio Dick Smiderle
2003-09-27 22:24:49 +00:00
Jan Wieck e9ff025345 Fixed calculation of bid when generating accounts. Used to create
accounts.bid values of zero.

Jan
2003-09-27 19:15:34 +00:00
Tom Lane 03858c078b Add positive defense against dropped columns, per suggestion from
Christopher Kings-Lynne.  Also fix a couple more schema-awareness issues.
2003-09-24 05:38:38 +00:00
Teodor Sigaev 0b1ee9b5a3 fix hlfinditem function. Thanks to "Stphane Bidoul" <stephane.bidoul@softwareag.com>.
The 'word' variable there is initialised from
the prs->words array, but immediately after,
that array may be reallocated, thus leaving
word pointing to unallocated memory.
2003-09-22 13:32:33 +00:00
Tom Lane 3f43446e36 Persuade tsearch/tsearch2 to work (or at least pass their regression
tests) when using flex 2.5.31.  The fix is to *not* try to use palloc
and pfree for allocations within the lexer; when you do that, the
yy_buffer_stack gets freed at inopportune times.  The code is already
set up to do manual deallocation, so I see no particular advantage to
using palloc anyway.
2003-09-14 18:44:23 +00:00
Tom Lane 0e9b05bde9 expected results for dblink test seem to be out of date ... 2003-09-14 02:30:07 +00:00
Tom Lane 043be9ad96 Make contrib/seg work with flex 2.5.31. Fix it up to have a real
btree operator class, too, since in PG 7.4 you can't GROUP without one.
2003-09-14 02:18:49 +00:00
Tom Lane 03e47392e0 Make contrib/cube work with flex 2.5.31. Fix it up to have a real
btree operator class, too, since in PG 7.4 you can't GROUP without one.
2003-09-14 01:52:25 +00:00
Tom Lane c472b8366f With Joe Conway's concurrence, remove srandom() call from normal_rand().
This was the last piece of code that took it upon itself to reset the
random number sequence --- now we only have srandom() in postmaster start,
backend start, and explicit setseed() operations.
2003-09-13 21:44:50 +00:00
Tom Lane f51759064c Minor wording improvements. 2003-09-13 17:33:46 +00:00
Bruce Momjian 2056f8a7da pgindent C file, per patch request. 2003-09-13 16:27:38 +00:00
Bruce Momjian 3bf080daaf > OK, well as we wait on the fix for the stats system, let me submit my
> patch for pg_autovacuum.  This patch assumes that the stats system will
> be fixed so that all inserts, updates and deletes performed on shared
> tables reguardless of what database those commands were executed from,
> will show up in the stats shown in each database.

I had to make a further change to this to take quotes off the 'last
ANALYZE' in order for it to not overquote the relation name, so
there's a _little_ work left to get it to play well.

I have deployed it onto several boxes that should be doing some
vacuuming over the weekend, and it is now certainly hitting pg_
tables.

I would like to present a CVS-oriented patch; unfortunately, I had to
change the indentation patterns when editing some of it :-(.  The
following _may_ be good; not sure...

Matthew T. O'Connor
Christopher Browne
2003-09-13 16:26:18 +00:00
Tom Lane 17d15ddf75 Fix incorrect pfree in to_tsquery_name(), per Nigel Andrews. 2003-09-12 16:34:28 +00:00
Bruce Momjian 3d48045ae1 > It quotes table names for vacuum and analyze, and uppercases the
> keywords for clarity.

Yeah, this is basically what I meant, sorry I didn't get to it quicker.

However, I tested it out a little and the patch you made doesn't work
because it produces commands like:

VACUUM ANALYZE "public.FooBar"

Which doesn't work, so I made my own patch that creates commands like:

VACUUM ANALYZE "public"."FooBar"

This allows for mixed case schema names as well as tables.

Adam, can you please give this a test as you are the person who caught
the bug in the first place.

Thanks,

Matthew T. O'Connor
2003-09-11 19:01:18 +00:00
Bruce Momjian a5e9e51fb0 on my timetravel.c I find a bug: after the
ALTER TABLE mytable drop column last_column_of_table;

the timetravel trigger say on UPDATE/DELETE:

ERROR:  parser: parse error at end of input


Here is the patch for this bug

B?jthe Zolt?n
2003-09-11 17:25:14 +00:00
Bruce Momjian 92e100dd33 Here is a patch that removes contrib/array, leaving only the README with
some examples of the new syntax and a reference to the documentation.

Joe Conway.
2003-09-11 17:15:27 +00:00
Bruce Momjian a72fce035d Add quotes to vacuum/analyze for upper/lowercase table names, per
Matthew T. O'Connor.
2003-09-10 19:57:48 +00:00
Bruce Momjian a9953097f4 Clean up printability test in dbase code. 2003-09-10 00:33:51 +00:00
Tom Lane 2f606ed87d Remove another useless, counterproductive srandom() call. 2003-09-07 15:27:25 +00:00
Teodor Sigaev 61366a9503 More accuracy works with stopwords in queries 2003-08-28 12:23:24 +00:00
Teodor Sigaev 9116f6c91a fix module name in MODULE_PATHNAME substitution 2003-08-26 10:01:02 +00:00
Peter Eisentraut 3d0d78ce2f Bring the makefiles up to our conventions. 2003-08-23 04:25:29 +00:00
Peter Eisentraut 4682776302 Enable uninstalling data files that were installed from a subdirectory of
the source tree.
2003-08-23 04:23:38 +00:00
Teodor Sigaev 38e2bf6283 ISpell info updated 2003-08-21 15:53:21 +00:00
Teodor Sigaev d3fe721a40 Eliminate function start_parse_fh and macro YY_INPUT 2003-08-15 13:44:35 +00:00
Teodor Sigaev 364ef51484 Correct error messages 2003-08-13 14:41:59 +00:00
Teodor Sigaev bcec1e617a More accuracy work with MinWords option of headline function 2003-08-13 14:37:55 +00:00
Bruce Momjian 46785776c4 Another pgindent run with updated typedefs. 2003-08-08 21:42:59 +00:00
Bruce Momjian 3b2440ebec Remove simple_prompt from /contrib C files, now that it is in /port.
They had the old versions anyway.
2003-08-08 20:20:49 +00:00
Tom Lane 33ab177a56 Don't assume that struct option is available just because we can find a
getopt_long().  This is more or less the same problem as we saw earlier
with getaddrinfo() and struct addrinfo, and for the same reason: random
user-added libraries might contain the subroutine, but there's no
guarantee we will find the matching header files.
2003-08-07 21:11:58 +00:00
Teodor Sigaev 8753157739 OpenFTS vs Tsearch2 comment 2003-08-06 14:53:01 +00:00
Teodor Sigaev d702313f0d Add documentation about ts_debug 2003-08-06 09:41:13 +00:00
Teodor Sigaev dd2870f76f Add ts_debug function for debugging configurations 2003-08-06 09:19:21 +00:00
Tom Lane 2f9c859ea1 Fix some copyright notices that weren't updated. Improve copyright tool
so it won't miss 'em again.
2003-08-04 23:59:41 +00:00
Tom Lane 77489f4523 Update vacuumlo to be properly schema-aware. Improve documentation. 2003-08-04 22:03:39 +00:00
Tom Lane 3b29525a79 Sub-Makefiles need to explicitly add CFLAGS_SL to CFLAGS, else their
object files do not get built with -fpic.
2003-08-04 20:34:26 +00:00
Tom Lane f237a80d8a Fix to build correctly outside source tree. 2003-08-04 19:52:37 +00:00
Teodor Sigaev d6f0f44b55 make sub-Makefiles in the sub-directories 2003-08-04 14:54:47 +00:00
Teodor Sigaev 8405e505c4 Docs fixes 2003-08-04 14:11:08 +00:00
Bruce Momjian f3c3deb7d0 Update copyrights to 2003. 2003-08-04 02:40:20 +00:00
Bruce Momjian 089003fb46 pgindent run. 2003-08-04 00:43:34 +00:00
Tom Lane 2c018f9b10 Fix for Alpha portability. 2003-08-01 03:55:05 +00:00
Tom Lane 6ed071bca5 Update contrib regression tests for recent error message editing. 2003-08-01 02:38:09 +00:00
Tom Lane 1e120a8e5d Add missing #include. 2003-08-01 02:25:31 +00:00
Tom Lane 3896f48d7e Fix some minor portability issues, per Chris K-L. 2003-08-01 02:21:17 +00:00
Bruce Momjian 82bade79dc dbf2pg - Insert xBase-style .dbf-files into a PostgreSQL-table
There is an option "-s oldname=newname", which changes the old field name of
  the dbf-file to the newname in PostgeSQL. If the length of the new name is 0,
  the field is skiped. If you want to skip the first field of the dbf-file,
  you get the wildest error-messages from the backend.
  dbf2pg load the dbf-file via "COPY tablename FROM STDIN". If you skip the
  first field, it is an \t to much in STDIN.

A fix could be an counter j=0, which increments only, if a field is imported
(IF (strlen(fields[h].db_name)> 0) j++. And only if j > 1 (if an other field is
imported) the \t is printed.

An other small bug in the README:
-s start
              Specify  the  first record-number in the xBase-file
              we will insert.
should be
-e start
              Specify  the  first record-number in the xBase-file
              we will insert.

Thomas Behr
2003-07-31 02:12:43 +00:00
Tom Lane 81b5c8a136 A visit from the message-style police ... 2003-07-28 00:09:16 +00:00
Bruce Momjian 606debf268 Updatge to skip composite types. 2003-07-27 20:12:06 +00:00
Bruce Momjian 51e46d14f8 Adjust oid2name to skip certain row types, per Tom. 2003-07-27 19:30:24 +00:00
Tom Lane aec57ea868 elog mop-up. 2003-07-27 18:07:19 +00:00
Tom Lane e8db9b26d0 elog mop-up. 2003-07-27 17:10:07 +00:00
Tom Lane aeea73d4ec Remove unportable // comments. 2003-07-27 16:32:34 +00:00
Bruce Momjian b29c557e0f Cleanup of timetravel compile warnings. 2003-07-27 04:59:29 +00:00
Bruce Momjian 524cfad23f Here is 4 file in tgz:
the new timetravel.c,
new timetravel.README (cut from spi/README and modified),
modified timetravel.sql.in
and modified timetravel.example.

Features:
- optionally 3 parameter for insert/update/delete user name

- work with CREATE UNIQUE INDEX ixxx on table xxx
(unique_field,time_off);
    (the  original version was work with unique index on 6.5.0-6.5.3,
and not work on 7.3.2,7.3.3)
     (before 6.5.0 and between 6.5.3 and 7.3.2 I dont know)

- get_timetravel(tablename) function for check timetravel-status.

- timetravel trigger not change  oid of the active record. (it is not a
good feature, because the  old version is automatice prevent the paralel
update with "where oid=nnn")

B?jthe Zolt?n
2003-07-27 04:51:45 +00:00
Bruce Momjian a265b7f70a > Am Son, 2003-06-22 um 02.09 schrieb Joe Conway:
>>Sounds like all that's needed for your case. But to be complete, in
>>addition to changing tablefunc.c we'd have to:
>>1) come up with a new function call signature that makes sense and does
>>not cause backward compatibility problems for other people
>>2) make needed changes to tablefunc.sql.in
>>3) adjust the README.tablefunc appropriately
>>4) adjust the regression test for new functionality
>>5) be sure we don't break any of the old cases
>>
>>If you want to submit a complete patch, it would be gratefully accepted
>>-- for review at least ;-)
>
> Here's the patch, at least for steps 1-3

Nabil Sayegh
Joe Conway
2003-07-27 03:51:59 +00:00
Bruce Momjian 9df03060e9 Fix for Linux startup script.
Slawomir Sudnik
2003-07-26 20:42:55 +00:00
Tom Lane 658fca8d3a Fix a few portability issues, adjust error messages. 2003-07-24 17:59:56 +00:00
Tom Lane 8fd5b3ed67 Error message editing in contrib (mostly by Joe Conway --- thanks Joe!) 2003-07-24 17:52:50 +00:00
Tom Lane f0c5384d4a Add tsearch2. 2003-07-24 16:54:58 +00:00
Teodor Sigaev 11eb002c5b Remove link of tarball 2003-07-22 14:06:36 +00:00
Teodor Sigaev f5c0ef4dda Mark tsearch v1 as deprecated 2003-07-22 13:21:48 +00:00
Teodor Sigaev 8f146a9077 Fix output to psql:tsearch2.sql:13: NOTICE: ... "pg_ts_dict_pkey" 2003-07-21 15:15:19 +00:00
Teodor Sigaev b88605337e tsearch2 module 2003-07-21 10:27:44 +00:00
Teodor Sigaev 2c914937c1 Fix subpath and subltree. Allow to return '' value.
subpath(ltree,0,0) returns ''.
2003-07-18 13:27:43 +00:00
Tom Lane ede1734cf8 Update contrib/Makefile's list of subdirectories that it does not try
to build.
2003-06-30 20:02:53 +00:00
Tom Lane 142cb7b3f4 Put back inappropriately-removed entry for earthdistance subdirectory. 2003-06-30 19:58:57 +00:00
Bruce Momjian e8902f00cc Group ISBN/ISSN definitions. 2003-06-28 00:36:40 +00:00
Bruce Momjian ec67d2a3fe Back out rserv changes that would allow limit of replicated tables ---
not ready yet.
2003-06-25 21:37:53 +00:00
Tom Lane 91e6f51afb 'third' -> 'fourth' where needed, per Joe Conway. 2003-06-25 18:13:50 +00:00
Bruce Momjian c70e606a4c Includes:
- LIKE <subtable> [ INCLUDING DEFAULTS | EXCLUDING DEFAULTS ]
- Quick cleanup of analyze.c function prototypes.
- New non-reserved keywords (INCLUDING, EXCLUDING, DEFAULTS), SQL 200X

Opted not to extend for check constraints at this time.

As per the definition that it's user defined columns, OIDs are NOT
inherited.

Doc and Source patches attached.

--
Rod Taylor <rbt@rbt.ca>
2003-06-25 03:40:19 +00:00
Bruce Momjian b24a0293cc Attached is a patch that provides *VERY* limited support for multiple
slave
servers.  I haven't tested it very well, so use at your own risk (and I
recommend against using it in production).

Basically, I have a central database server that has 4 summary tables
inside
it replicated to a remote slave (these database tables are for my mail
server
authentication, so these are replicated to another server tuned for many
connections, and so I don't have postgres connections opened straight to
my
back-end database server).

Unfortunately, I also wanted to implement a replication database server
for
hot-backups.  I realized, too late, that the replication process is
pretty
greedy and will try to replicate all tables marked as a
"MasterAddTable".

To make a long story, I made a patch to RServ.pm and Replicate that
allows you
to specify, on the command line, a list of tables that you want to
replicate...it'll ignore all others.

I haven't finished, since this has to be integrated with CleanLog for
instance, but this should (and does) suffice for the moment.

I have yet to test it with two slaves, but at least my mail server
replication
database now works (it was failing every time it tried to replicate, for
a
variety of reasons).

Anyone have any suggestions on how to improve on this?  (or, if someone
more
familiar with this code wants to take the ball and run with it, you're
welcome to).

--
Michael A Nachbaur <mike@nachbaur.com>
2003-06-25 01:17:44 +00:00
Bruce Momjian 51d16423ae - Corrections for tables, columns with uppercase characters
- Don't attempt to convert partial or expressional unique indexes
- Don't attempt to convert unique indexes based on a non-default
opclasses

- Untested prevention of conversion of non-btree indexes unique
indexes.  Untested as postgresql doesn't allow hash, gist, or rtree
based indexes to be unique.

rbt=# create unique index t on a using hash (col);
ERROR:  DefineIndex: access method "hash" does not support UNIQUE
indexes
rbt=# create unique index t on a using gist (col);
ERROR:  DefineIndex: access method "gist" does not support UNIQUE
indexes
rbt=# select version();
                                version
------------------------------------------------------------------------
 PostgreSQL 7.4devel on i386-unknown-freebsd4.8, compiled by GCC 2.95.4

Rod Taylor
2003-06-25 01:11:09 +00:00
Bruce Momjian 8f337e86cd Please apply attached patch to contrib/dblink. It adds named persistent
connections to dblink.

Shridhar Daithanka
2003-06-25 01:10:15 +00:00
Bruce Momjian 7b1f6ffaab Jim C. Nasby wrote:
> Second argument to metaphone is suposed to set the limit on the
> number of characters to return, but it breaks on some phrases:
>
> usps=# select metaphone(a,3),metaphone(a,4),metaphone(a,20) from
> (select 'Hello world'::varchar AS a) a;
> HLW       | HLWR      | HLWRLT
>
> usps=# select metaphone(a,3),metaphone(a,4),metaphone(a,20) from
> (select 'A A COMEAUX MEMORIAL'::varchar AS a) a;
  > AKM       | AKMKS     | AKMKSMMRL
>
> In every case I've found that does this, the 4th and 5th letters are
> always 'KS'.

Nice catch.

There was a bug in the original metaphone algorithm from CPAN. Patch
attached (while I was at it I updated my email address, changed the
copyright to PGDG, and removed an unnecessary palloc). Here's how it
looks now:

regression=# select metaphone(a,4) from (select 'A A COMEAUX
MEMORIAL'::varchar AS a) a;
   metaphone
-----------
   AKMK
(1 row)

regression=# select metaphone(a,5) from (select 'A A COMEAUX
MEMORIAL'::varchar AS a) a;
   metaphone
-----------
   AKMKS
(1 row)

Joe Conway
2003-06-24 22:59:46 +00:00
Tom Lane 3fb6f1347f Replace cryptic 'Unknown kind of return type' messages with something
hopefully a little more useful.
2003-06-15 17:59:10 +00:00
Bruce Momjian a647e30ba3 New patch with corrected README attached.
Also quickly added mention that it may be a qualified schema name.

Rod Taylor
2003-06-12 08:02:57 +00:00
Bruce Momjian 310c084921 Add Linux restart --- Slawomir Sudnik
Add "-l $PGLOG" for restart --- Darko Prenosil
2003-06-12 02:02:24 +00:00
Bruce Momjian 9243664dd4 This patch updates pg_autovacuum in several ways:
* A few bug fixes
* fixes solaris compile and crash issue
* decouple vacuum analyze and analyze thresholds
* detach from tty (dameonize)
* improved logging layout
* more conservative default configuration
* improved, expanded and updated README

please apply and 1st convenience, or before code freeze which ever comes
first :-)

At this point I think I have brought pg_autovacuum and its client side
design as far as I think it should go.  It works, keeping file sizes in
check, helps performance and give the administrator a fair amount
flexibility in configuring it.

Next up is to do the FSM based design that is integrated into the back
end.

p.s. Thanks to Christopher Browne for his help.

Matthew T. O'Connor
2003-06-12 01:36:44 +00:00
Tom Lane 6a276b7bfd Update expected file to match new _int.sql. 2003-06-11 19:43:36 +00:00
Bruce Momjian a237dd2b30 Add missing intarray files. 2003-06-11 19:31:05 +00:00
Bruce Momjian 47d5c3d5e7 Changes:
1 intarray: bugfix for int[]-int[] operation
2 intarray: split _int.c to several files (_int.c now is unused)
3 ntarray (gist__intbig_ops opclass): use special type for index storage
4 ltree (gist__ltree_ops opclass), intarray (gist__intbig_ops): optimize
GiST's
penalty and picksplit interface functions, now use Hemming distance.

Teodor Sigaev
2003-06-11 18:44:15 +00:00
Tom Lane bd48e09f2a Remove platform-specific executable; does not belong in distribution. 2003-06-11 14:02:57 +00:00
Tatsuo Ishii 412893b416 Fix uninitialized memory bug
Add support for PGHOST, PGPORT, PGUSER environment variables
2003-06-10 09:07:15 +00:00
Tom Lane 5666462f2e Ensure that in all flex lexers that are part of the backend, a
yy_fatal_error() call results in elog(ERROR) not exit().  This was
already fixed in the main lexer and plpgsql, but extend same technique
to all the other dot-l files.  Also, on review of the possible calls
to yy_fatal_error(), it seems safe to use elog(ERROR) not elog(FATAL).
2003-05-29 22:30:02 +00:00
Tom Lane fc8d970cbc Replace functional-index facility with expressional indexes. Any column
of an index can now be a computed expression instead of a simple variable.
Restrictions on expressions are the same as for predicates (only immutable
functions, no sub-selects).  This fixes problems recently introduced with
inlining SQL functions, because the inlining transformation is applied to
both expression trees so the planner can still match them up.  Along the
way, improve efficiency of handling index predicates (both predicates and
index expressions are now cached by the relcache) and fix 7.3 oversight
that didn't record dependencies of predicate expressions.
2003-05-28 16:04:02 +00:00
Bruce Momjian 98b6f37e47 Make debug_ GUC varables output DEBUG1 rather than LOG, and mention in
docs that CLIENT/LOG_MIN_MESSAGES now controls debug_* output location.
Doc changes included.
2003-05-27 17:49:47 +00:00
Tom Lane f45df8c014 Cause CHAR(n) to TEXT or VARCHAR conversion to automatically strip trailing
blanks, in hopes of reducing the surprise factor for newbies.  Remove
redundant operators for VARCHAR (it depends wholly on TEXT operations now).
Clean up resolution of ambiguous operators/functions to avoid surprising
choices for domains: domains are treated as equivalent to their base types
and binary-coercibility is no longer considered a preference item when
choosing among multiple operators/functions.  IsBinaryCoercible now correctly
reflects the notion that you need *only* relabel the type to get from type
A to type B: that is, a domain is binary-coercible to its base type, but
not vice versa.  Various marginal cleanup, including merging the essentially
duplicate resolution code in parse_func.c and parse_oper.c.  Improve opr_sanity
regression test to understand about binary compatibility (using pg_cast),
and fix a couple of small errors in the catalogs revealed thereby.
Restructure "special operator" handling to fetch operators via index opclasses
rather than hardwiring assumptions about names (cleans up the pattern_ops
stuff a little).
2003-05-26 00:11:29 +00:00