Commit Graph

826 Commits

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