OSDN Git Service
Neil Conway [Fri, 20 May 2005 12:36:48 +0000 (12:36 +0000)]
Fix typo in ECPG docs, per Andreas Seltenreich.
Neil Conway [Fri, 20 May 2005 01:52:25 +0000 (01:52 +0000)]
Add some links to the CREATE FUNCTION reference page when describing
function definition for particular PLs. Original patch from David
Fetter, editorializing by Neil Conway.
Neil Conway [Fri, 20 May 2005 01:37:08 +0000 (01:37 +0000)]
Make the CREATE RULE syntax description in rules.sgml more consistent
with the syntax description in the CREATE RULE reference page. From
Kris Jurka.
Neil Conway [Fri, 20 May 2005 01:29:56 +0000 (01:29 +0000)]
Implement md5(bytea), update regression tests and documentation. Patch
from Abhijit Menon-Sen, minor editorialization from Neil Conway. Also,
improve md5(text) to allocate a constant-sized buffer on the stack
rather than via palloc.
Catalog version bumped.
Tom Lane [Thu, 19 May 2005 23:58:51 +0000 (23:58 +0000)]
Make a comment pgindent-proof, per suggestion from Alvaro.
Tom Lane [Thu, 19 May 2005 23:57:11 +0000 (23:57 +0000)]
Update comment that I missed the first time around.
Tom Lane [Thu, 19 May 2005 23:30:18 +0000 (23:30 +0000)]
Factor out lock cleanup code that is needed in several places in lock.c.
Also, remove the rather useless return value of LockReleaseAll. Change
response to detection of corruption in the shared lock tables to PANIC,
since that is the only way of cleaning up fully.
Originally an idea of Heikki Linnakangas, variously hacked on by
Alvaro Herrera and Tom Lane.
Tom Lane [Thu, 19 May 2005 21:35:48 +0000 (21:35 +0000)]
Split the shared-memory array of PGPROC pointers out of the sinval
communication structure, and make it its own module with its own lock.
This should reduce contention at least a little, and it definitely makes
the code seem cleaner. Per my recent proposal.
Neil Conway [Wed, 18 May 2005 05:01:10 +0000 (05:01 +0000)]
Upon closer inspection, Greg's psql tab completion patch leaks memory.
Fix the leak, and add a comment to note that the return value of
previous_word must be free'd.
Neil Conway [Wed, 18 May 2005 04:47:40 +0000 (04:47 +0000)]
psql tab completion improvements, from Greg Sabino Mullane:
* Made DELETE into "DELETE FROM"
* Moved ANALZYE to the end of the list to ease EXPLAIN / VACUUM
conflicts
* Removed the ANALYZE xx semicolon completion: we don't do that anywhere
else
* Add DECLARE support
* Add parens for DROP AGGREGATE
* Add "CASCADE | RESTRICT" for DROP xx
* Make EXPLAIN <tab> a lot smarter
* GROUP "BY" and ORDER "BY"
* "ISOLATION" becomes "ISOLATION LEVEL"
* Fix error in which REVOKE xx ON yy was receiving "TO", now gets "FROM"
* Add GRANT/REVOKE xx ON yy TO/FROM choices: usernames, GROUP, PUBLIC
* PREPARE xx <tab> AS "SELECT | INSERT | UPDATE | DELETE"
* Add = at end of UPDATE xx SET yy
* Beef up VACUUM stuff
Tom Lane [Tue, 17 May 2005 21:46:11 +0000 (21:46 +0000)]
Extend the pg_locks system view so that it can fully display all lock
types, as per recent discussion.
Tom Lane [Tue, 17 May 2005 18:26:23 +0000 (18:26 +0000)]
Add a --dbname option to the pg_regress script, and use pl_regression
for testing PLs and contrib_regression for testing contrib, instead of
overwriting the core system's regression database as formerly done.
Andrew Dunstan
Tom Lane [Tue, 17 May 2005 17:30:29 +0000 (17:30 +0000)]
Guard against duplicate IDs in input file in SortTocFromFile().
Per report from Brian Hackett.
Bruce Momjian [Tue, 17 May 2005 04:18:20 +0000 (04:18 +0000)]
Update:
< * All ability to monitor the use of temporary sort files
> * Add ability to monitor the use of temporary sort files
Bruce Momjian [Tue, 17 May 2005 04:17:47 +0000 (04:17 +0000)]
Convert Chinese FAQ to valid XHTML, finally.
Bruce Momjian [Tue, 17 May 2005 03:40:35 +0000 (03:40 +0000)]
Fix Chinese markup some more.
Neil Conway [Tue, 17 May 2005 03:34:18 +0000 (03:34 +0000)]
Cleanup GiST header files. Since GiST extensions are often written as
external projects, we should be careful about what parts of the GiST
API are considered implementation details, and which are part of the
public API. Therefore, I've moved internal-only declarations into
gist_private.h -- future backward-incompatible changes to gist.h should
be made with care, to avoid needlessly breaking external GiST extensions.
Also did some related header cleanup: remove some unnecessary #includes
from gist.h, and remove some unused definitions: isAttByVal(), _gistdump(),
and GISTNStrategies.
Neil Conway [Tue, 17 May 2005 00:59:30 +0000 (00:59 +0000)]
GiST improvements:
- make sure we always invoke user-supplied GiST methods in a short-lived
memory context. This means the backend isn't exposed to any memory leaks
that be in those methods (in fact, it is probably a net loss for most
GiST methods to bother manually freeing memory now). This also means
we can do away with a lot of ugly manual memory management in the
GiST code itself.
- keep the current page of a GiST index scan pinned, rather than doing a
ReadBuffer() for each tuple produced by the scan. Since ReadBuffer() is
expensive, this is a perf. win
- implement dead tuple killing for GiST indexes (which is easy to do, now
that we keep a pin on the current scan page). Now all the builtin indexes
implement dead tuple killing.
- cleanup a lot of ugly code in GiST
Bruce Momjian [Tue, 17 May 2005 00:51:58 +0000 (00:51 +0000)]
Fix markup:
< * Add internationalized message strings
> o Add internationalized message strings
Bruce Momjian [Tue, 17 May 2005 00:51:10 +0000 (00:51 +0000)]
Update italics.
Tom Lane [Tue, 17 May 2005 00:43:47 +0000 (00:43 +0000)]
Modify tidbitmap.c to avoid creating a hash table until there is more
than one heap page represented in the bitmap. This is a bit ugly but
it cuts overhead fairly effectively in simple join cases. Per example
from Sergey Koposov.
Bruce Momjian [Tue, 17 May 2005 00:24:22 +0000 (00:24 +0000)]
Update italics on web site.
Bruce Momjian [Mon, 16 May 2005 23:35:42 +0000 (23:35 +0000)]
Update italics on web site.
Bruce Momjian [Mon, 16 May 2005 22:27:54 +0000 (22:27 +0000)]
Update Chinese FAQ to validate properly.
Neil Conway [Mon, 16 May 2005 06:45:57 +0000 (06:45 +0000)]
Fix typo in comment.
Neil Conway [Mon, 16 May 2005 05:52:13 +0000 (05:52 +0000)]
Fix a few minor mistakes in header comments. From Qingqing Zhou.
Bruce Momjian [Mon, 16 May 2005 02:50:20 +0000 (02:50 +0000)]
Update Chinese FAQ to xhtml.
Tom Lane [Mon, 16 May 2005 00:19:04 +0000 (00:19 +0000)]
Adjust out-of-date comment.
Tom Lane [Sun, 15 May 2005 21:19:55 +0000 (21:19 +0000)]
Fix latent bug in ExecSeqRestrPos: it leaves the plan node's result slot
in an inconsistent state. (This is only latent because in reality
ExecSeqRestrPos is dead code at the moment ... but someday maybe it won't
be.) Add some comments about what the API for plan node mark/restore
actually is, because it's not immediately obvious.
Neil Conway [Sun, 15 May 2005 04:08:29 +0000 (04:08 +0000)]
Various style cleanups for GiST; no changes to functionality.
Bruce Momjian [Sun, 15 May 2005 00:26:19 +0000 (00:26 +0000)]
Rename Rendezvous to Bonjour to match OS/X renaming.
Tom Lane [Sat, 14 May 2005 23:16:29 +0000 (23:16 +0000)]
Further marginal speed hacking: in MemoryContextReset, don't call
MemoryContextResetChildren unless necessary.
Tom Lane [Sat, 14 May 2005 21:29:23 +0000 (21:29 +0000)]
Minor refactoring to eliminate duplicate code and make startup a
tad faster.
Tom Lane [Sat, 14 May 2005 20:29:13 +0000 (20:29 +0000)]
Minor speed hacks in AllocSetReset: avoid clearing the freelist headers
when the blocks list is empty (there can surely be no freelist items if
the context contains no memory), and use MemSetAligned not MemSet to
clear the headers (we assume alignof(pointer) >= alignof(int32)).
Per discussion with Atsushi Ogawa. He proposes some further hacking
that I'm not yet sold on, but these two changes are unconditional wins
since there is no case in which they make things slower.
Tom Lane [Sat, 14 May 2005 17:55:22 +0000 (17:55 +0000)]
Convert the existing regression test scripts for the various optional
PLs to use the standard pg_regress infrastructure. No changes in the
tests themselves. Andrew Dunstan
Bruce Momjian [Sat, 14 May 2005 16:26:17 +0000 (16:26 +0000)]
Re-order items, add mention of how to propose working on a TODO item.
Tom Lane [Fri, 13 May 2005 21:20:16 +0000 (21:20 +0000)]
Revise nodeMergejoin in light of example provided by Guillaume Smet.
When one side of the join has a NULL, we don't want to uselessly try
to match it against every remaining tuple of the other side. While
at it, rewrite the comparison machinery to avoid multiple evaluations
of the left and right input expressions and to use a btree comparator
where available, instead of double operator calls. Also revise the
state machine to eliminate redundant comparisons and hopefully make it
more readable too.
Bruce Momjian [Fri, 13 May 2005 18:12:35 +0000 (18:12 +0000)]
Add -N make flag to bcc builds from /src dir.
Tom Lane [Fri, 13 May 2005 16:48:14 +0000 (16:48 +0000)]
Add missing quote, per Dave Page.
Tom Lane [Fri, 13 May 2005 16:31:43 +0000 (16:31 +0000)]
Update createuser examples to match the current program behavior,
and add an example showing assignment of a password. Per suggestion
from Jari Aalto (via Martin Pitt).
Tom Lane [Fri, 13 May 2005 15:21:59 +0000 (15:21 +0000)]
Fix broken markup.
Bruce Momjian [Fri, 13 May 2005 13:47:18 +0000 (13:47 +0000)]
Update chinese encoding specification.
Neil Conway [Fri, 13 May 2005 06:33:40 +0000 (06:33 +0000)]
Add regression test for consecutive newlines in COPY CSV mode. (There is
no bug related to this functionality in HEAD, but it's worth adding a test
for anyway.) From Andrew Dunstan.
Tom Lane [Thu, 12 May 2005 20:41:56 +0000 (20:41 +0000)]
Remove some unnecessary code: since ExecMakeFunctionResultNoSets does not
want to handle set inputs, it should just pass NULL for isDone, not make
its own failure check.
Neil Conway [Thu, 12 May 2005 00:39:37 +0000 (00:39 +0000)]
This patch makes some minor style cleanups to contrib/btree_gist: remove
the "extern" keyword from function definitions, reorganize some
PG_GETARG_XXX() usage, and similar.
Tom Lane [Wed, 11 May 2005 21:52:03 +0000 (21:52 +0000)]
Give pg_regress a --load-language option, so that it can be used to test
other PLs besides plpgsql. Andrew Dunstan
Bruce Momjian [Wed, 11 May 2005 18:07:14 +0000 (18:07 +0000)]
a small tweak to enable display in the log file
of database name before table name
when VACUUMing or ANALYZing a table.
Cosimo Streppone
Bruce Momjian [Wed, 11 May 2005 18:05:37 +0000 (18:05 +0000)]
This patch will ensure that the hash table iteration performed by
AtCommit_Portals is restarted when a portal is deleted. This is
necessary since the deletion of a portal may cause the deletion of
another which on rare occations may cause the iterator to return a
deleted portal an thus a renewed attempt delete.
Thomas Hallgren
Bruce Momjian [Wed, 11 May 2005 17:57:56 +0000 (17:57 +0000)]
Fix pg_autovacuum -s flag to handle values > 2000 by using sleep()
instead of pg_usleep.
Backpatch to 8.0.X.
Bruce Momjian [Wed, 11 May 2005 16:13:20 +0000 (16:13 +0000)]
Update FAQ URLs.
Robert Treat
Bruce Momjian [Wed, 11 May 2005 16:02:12 +0000 (16:02 +0000)]
Document where to download free Microsoft and Borland development tools.
Bruce Momjian [Wed, 11 May 2005 15:10:20 +0000 (15:10 +0000)]
Document that bcc compiles now need the -N flag, backpatch to 8.0.X.
Bruce Momjian [Wed, 11 May 2005 14:56:50 +0000 (14:56 +0000)]
Update Chinese FAQ, per Magnus.
Bruce Momjian [Wed, 11 May 2005 14:53:43 +0000 (14:53 +0000)]
Tag 1000000L as long for compuation.
Neil Conway [Wed, 11 May 2005 13:58:50 +0000 (13:58 +0000)]
Fix newly introduced spelling error.
Bruce Momjian [Wed, 11 May 2005 13:36:14 +0000 (13:36 +0000)]
Add mention that not all functions are listed.
Update Chinese FAQ for HTML.
Neil Conway [Wed, 11 May 2005 06:24:55 +0000 (06:24 +0000)]
This patch refactors away some duplicated code in the index AM build
methods: they all invoke UpdateStats() since they have computed the
number of heap tuples, so I created a function in catalog/index.c that
each AM now calls.
Bruce Momjian [Wed, 11 May 2005 02:11:05 +0000 (02:11 +0000)]
Add Chinese FAQ.
laser@pgsqldb.com
Neil Conway [Wed, 11 May 2005 01:41:41 +0000 (01:41 +0000)]
This patch reduces the size of the message header used by statistics
collector messages, per recent discussion on pgsql-patches. This
actually required quite a few changes -- for example,
"databaseid != InvalidOid" was used to check whether a slot in the
backend entry table was initialized, but that no longer works since
the slot might be initialized prior to receiving the BESTART message
which contains the database id. We now use procpid > 0 to indicate
that a slot is non-empty.
Other changes:
- various comment improvements and cleanups
- there's no need to zero-out the entire activity buffer in
pgstat_add_backend(), we can just set activity[0] to '\0'.
- remove the counting of the # of connections to a database; this
was not used anywhere
One change in behavior I wasn't sure about: previously, the code
would create a hash table entry for a database as soon as any message
was received whose header referenced that database. Now, we only
create hash table entries as needed (so for example BESTART won't
create a database hash table entry, since it doesn't need to
access anything in the per-db hash table). It would be easy enough
to retain the old behavior, but AFAICS it is not required.
Neil Conway [Wed, 11 May 2005 01:26:02 +0000 (01:26 +0000)]
Code cleanup: in C89, there is no point casting the first argument to
memset() or MemSet() to a char *. For one, memset()'s first argument is
a void *, and further void * can be implicitly coerced to/from any other
pointer type.
Bruce Momjian [Tue, 10 May 2005 22:27:30 +0000 (22:27 +0000)]
Back out check for unreferenced files.
Heikki Linnakangas
Bruce Momjian [Tue, 10 May 2005 22:26:56 +0000 (22:26 +0000)]
Item removed from CVS:
< * -Check for unreferenced table files created by transactions that were
> * Check for unreferenced table files created by transactions that were
Bruce Momjian [Tue, 10 May 2005 13:16:26 +0000 (13:16 +0000)]
Report index name on CLUSTER failure. Also, suggest ALTER TABLE
WITHOUT CLUSTER for cluster failure of a single table in a full db
cluster.
Neil Conway [Tue, 10 May 2005 05:15:07 +0000 (05:15 +0000)]
Fix typo in comment.
Bruce Momjian [Tue, 10 May 2005 03:21:58 +0000 (03:21 +0000)]
Add:
> * Fix sgmltools so PDFs can be generated with bookmarks
Bruce Momjian [Tue, 10 May 2005 03:21:00 +0000 (03:21 +0000)]
Add:
> * Allow postgresql.conf values to be set so they can not be changed by
> the user
Bruce Momjian [Tue, 10 May 2005 02:16:15 +0000 (02:16 +0000)]
Done:
< * Add session start time and last statement time to pg_stat_activity
> * -Add session start time and last statement time to pg_stat_activity
134c134
< * Add the client IP address and port to pg_stat_activity
> * -Add the client IP address and port to pg_stat_activity
Neil Conway [Tue, 10 May 2005 00:16:07 +0000 (00:16 +0000)]
Regression tests for the COPY CSV header feature. From Andrew Dunstan.
Bruce Momjian [Mon, 9 May 2005 17:26:22 +0000 (17:26 +0000)]
Rename encryption section.
Bruce Momjian [Mon, 9 May 2005 17:15:15 +0000 (17:15 +0000)]
Remove encryption FAQ item now that we have a doc section.
Bruce Momjian [Mon, 9 May 2005 17:13:04 +0000 (17:13 +0000)]
Improve wording of new documentation section on encryption, and move it
a few sections up.
Neil Conway [Mon, 9 May 2005 15:43:22 +0000 (15:43 +0000)]
Update "expected" regression test output for the recent stats collector
checkin. My apologies for breaking the tests.
Tatsuo Ishii [Mon, 9 May 2005 15:09:19 +0000 (15:09 +0000)]
Fix duplicate call to WRITE_NODE_FIELD(whereClause) in _outSelectStmt
Tom Lane [Mon, 9 May 2005 14:28:39 +0000 (14:28 +0000)]
Add some defenses against functions declared to return set that don't
actually follow the protocol; per example from Kris Jurka.
Neil Conway [Mon, 9 May 2005 11:31:34 +0000 (11:31 +0000)]
Complete the following TODO items:
* Add session start time to pg_stat_activity
* Add the client IP address and port to pg_stat_activity
Original patch from Magnus Hagander, code review by Neil Conway. Catalog
version bumped. This patch sends the client IP address and port number in
every statistics message; that's not ideal, but will be fixed up shortly.
Tom Lane [Mon, 9 May 2005 00:09:45 +0000 (00:09 +0000)]
Update release notes for upcoming re-releases.
Tom Lane [Sun, 8 May 2005 23:34:15 +0000 (23:34 +0000)]
Update release checklist to reflect that HISTORY and INSTALL don't
need to be created by hand anymore.
Bruce Momjian [Sun, 8 May 2005 03:29:06 +0000 (03:29 +0000)]
Add encryption section to documentation.
Christopher Browne
Bruce Momjian [Sun, 8 May 2005 03:08:05 +0000 (03:08 +0000)]
Documentation adjustments.
Vladimir Chukharev
Tom Lane [Sat, 7 May 2005 21:32:24 +0000 (21:32 +0000)]
Repair very-low-probability race condition between relation extension
and VACUUM: in the interval between adding a new page to the relation
and formatting it, it was possible for VACUUM to come along and decide
it should format the page too. Though not harmful in itself, this would
cause data loss if a third transaction were able to insert tuples into
the vacuumed page before the original extender got control back.
Tom Lane [Sat, 7 May 2005 21:22:01 +0000 (21:22 +0000)]
Adjust time qual checking code so that we always check TransactionIdIsInProgress
before we check commit/abort status. Formerly this was done in some paths
but not all, with the result that a transaction might be considered
committed for some purposes before it became committed for others.
Per example found by Jan Wieck.
Tom Lane [Sat, 7 May 2005 18:14:25 +0000 (18:14 +0000)]
Fix case in which a debug printout would print already-pfreed data.
Bruce Momjian [Sat, 7 May 2005 15:45:23 +0000 (15:45 +0000)]
Add description:
< Currently locale can only be set during initdb.
> Currently locale can only be set during initdb. No global tables have
> locale-aware columns. However, the database template used during
> database creation might have locale-aware indexes. The indexes would
> need to be reindexed to match the new locale.
Bruce Momjian [Sat, 7 May 2005 15:18:17 +0000 (15:18 +0000)]
Add comment on C locale test for upper/lower/initcap().
Neil Conway [Sat, 7 May 2005 05:48:50 +0000 (05:48 +0000)]
Revert the ld --as-needed patch. This breaks Fedora Core 3, due to a strange
interaction between ld, readline, termcap, and psql. The symptom is psql
failing with this error on startup:
symbol lookup error: /usr/lib64/libreadline.so.4: undefined symbol: BC
I'm still trying to find the best way to solve this, but in the mean time
I'm reverting the patch in order to unbreak FC3.
Bruce Momjian [Sat, 7 May 2005 04:38:08 +0000 (04:38 +0000)]
Done:
> o -Allow COPY to optionally include column headings in the first line
Bruce Momjian [Sat, 7 May 2005 04:24:34 +0000 (04:24 +0000)]
Add items:
> * Prevent to_char() on interval from returning meaningless values
>
> For example, to_char('1 month', 'mon') is meaningless. Basically,
> most date-related parameters to to_char() are meaningless for
> intervals because interval is not anchored to a date.
>
> * Allow to_char() on interval values to accumulate the highest unit
> requested
>
> o to_char(INTERVAL '1 hour 5 minutes', 'MI') => 65
> o to_char(INTERVAL '43 hours 20 minutes', 'MI' ) => 2600
> o to_char(INTERVAL '43 hours 20 minutes', 'WK:DD:HR:MI') => 0:1:19:20
> o to_char(INTERVAL '3 years 5 months','MM') => 41
>
> Some special format flag would be required to request such
> accumulation. Such functionality could also be added to EXTRACT.
> Prevent accumulation that crosses the month/day boundary because of
> the uneven number of days in a month.
>
Bruce Momjian [Sat, 7 May 2005 02:22:49 +0000 (02:22 +0000)]
Add COPY WITH CVS HEADER to allow a heading line as the first line in
COPY.
Andrew Dunstan
Bruce Momjian [Fri, 6 May 2005 19:13:02 +0000 (19:13 +0000)]
Update backend flowchart HTML.
Bruce Momjian [Fri, 6 May 2005 19:07:17 +0000 (19:07 +0000)]
Update flowchart sections to match current CVS.
Bruce Momjian [Fri, 6 May 2005 18:25:46 +0000 (18:25 +0000)]
Markup improvements.
Bruce Momjian [Fri, 6 May 2005 18:23:13 +0000 (18:23 +0000)]
Update backend flowchard wording
Bruce Momjian [Fri, 6 May 2005 17:48:03 +0000 (17:48 +0000)]
Adjust question spacing.
Tom Lane [Fri, 6 May 2005 17:24:55 +0000 (17:24 +0000)]
For some reason access/tupmacs.h has been #including utils/memutils.h,
which is neither needed by nor related to that header. Remove the bogus
inclusion and instead include the header in those C files that actually
need it. Also fix unnecessary inclusions and bad inclusion order in
tsearch2 files.
Tom Lane [Fri, 6 May 2005 14:28:53 +0000 (14:28 +0000)]
Update misleading comment about the use of lanpltrusted ... it is
significant regardless of the value of lanispl.
Bruce Momjian [Fri, 6 May 2005 03:42:17 +0000 (03:42 +0000)]
Update comment to mention "Name classification hierarchy" as place to
check for reserved words.
Bruce Momjian [Fri, 6 May 2005 03:38:05 +0000 (03:38 +0000)]
Remove documentation that CSV didn't handle carriage returns and line
feeds properly.
Bruce Momjian [Fri, 6 May 2005 02:56:42 +0000 (02:56 +0000)]
Convert some mulit-line comments in copy.c to single line, as appropriate.
Tom Lane [Fri, 6 May 2005 00:19:14 +0000 (00:19 +0000)]
Marginal performance improvements in dynahash: make sure that everything
associated with a hashtable is allocated in that hashtable's private
context, so that hash_destroy only has to destroy the context and not
do any retail pfree's; and tighten the inner loop of hash_seq_search.
Tom Lane [Thu, 5 May 2005 22:18:27 +0000 (22:18 +0000)]
Fix bogus hashtable setup. (This code has quite a few other problems
too, but that one is in my way at the moment.)