Commit Graph

958 Commits

Author SHA1 Message Date
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