git.postgresql.org Git - postgresql.git/log
Tom Lane [Tue, 2 Mar 2004 00:03:02 +0000 (00:03 +0000)]
Replace unportable use of /dev/stdin with lynx's -stdin switch.
Neil Conway [Mon, 1 Mar 2004 17:58:39 +0000 (17:58 +0000)]
Add a few more xrefs, where they seemed appropriate: for example, refer
to the discussion of planner statistics in the documentation for the
default_statistics_target GUC var.
Neil Conway [Mon, 1 Mar 2004 16:08:58 +0000 (16:08 +0000)]
Enable some additional warnings when running openjade and onsgmls.
Tom Lane [2004年2月29日 17:36:05 +0000 (17:36 +0000)]
make_sort_from_pathkeys()'s method for choosing which of several
equivalent sort expressions to use was broken: you can't just look
at the relation membership, you have to actually grovel over the
individual Vars in each expression. I think this did work when it
was written, but it was broken by subsequent optimizations that made
join relations not propagate every single input variable upward.
Must find the Var that got propagated, not choose one at random.
Per bug report from Daniel O'Neill.
Fix a typo in a recent commit to func.sgml that apparently broke the doc
build for some versions of OpenJade (unfortunately, my local version of
OpenJade didn't report the error...) -- thanks to Andrew Dunstan for
the report.
Fix a bunch (~88) typos that the OpenJade tools don't warn about by
default: some SGML tags weren't properly terminated.
"Corrects" the int8/float4/float8 tests under win32.
Claudio Natoli
Tom Lane [2004年2月28日 19:46:06 +0000 (19:46 +0000)]
Remove unneeded indxqual field in IndexScanState, and the useless work
spent initializing it during indexscan startup.
Translation updates
Translation update
Translation updates
Translation updates
Tom Lane [2004年2月27日 21:48:04 +0000 (21:48 +0000)]
Adjust remove_redundant_join_clauses() so that when it has a choice
of which redundant clause to remove, it removes the more expensive one.
In simple scenarios the clauses will be like 'var = var' and there's
no difference, but we are now capable of considering cases where there
are sub-selects in the clauses, and it makes a BIG difference.
Tom Lane [2004年2月27日 21:44:34 +0000 (21:44 +0000)]
genericcostestimate() neglected to include qual startup cost in
indexTotalCost. I think this may not make any real difference in 7.4,
but it definitely is a problem with CVS tip's new equation.
Tom Lane [2004年2月27日 21:42:00 +0000 (21:42 +0000)]
process_implied_equality must copy the substructure of the clauses it
is generating, to avoid problems when subselects are involved. Per
report from Damon Hart.
Fix a few omissions in the initcap() documentation & source code
comments, make some unrelated improvements to the functions
documentation, and perform some minor consistency cleanup
elsewhere. Original initcap() change from Dennis B., additional
changes by Neil C.
Update plpython docs to mention shared libs are possible in 2.3 or
later.
For immediate application to HEAD.
Corrects bit-rot of recently applied patch. win32/cygwin only.
Claudio Natoli
Update the pl/python shared build docs to match the recent version of
python.
For application to HEAD, following community review.
* Changes incorrect CYGWIN defines to __CYGWIN__
* Some localtime returns NULL checks (when unchecked cause SEGVs under
Win32
regression tests)
* Rationalized CreateSharedMemoryAndSemaphores and
AttachSharedMemoryAndSemaphores (Bruce, I finally remembered to do it);
requires attention.
Claudio Natoli
Tom Lane [2004年2月25日 18:10:51 +0000 (18:10 +0000)]
Teach plpgsql's lexer about dollar-quoted literals.
Andrew Dunstan, some help from Tom Lane.
Tom Lane [2004年2月24日 22:59:10 +0000 (22:59 +0000)]
anyarray really needs to be declared with typalign = 'd', so that entries
in pg_statistic are correctly aligned if they contain values that require
double alignment. Too bad we cannot force initdb for this in 7.4 branch.
Tom Lane [2004年2月24日 22:06:32 +0000 (22:06 +0000)]
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.
Tom Lane [2004年2月24日 21:45:18 +0000 (21:45 +0000)]
Implement dollar-quoting in the backend lexer and psql. Documentation
is still lacking, as is support in plpgsql and other places, but this is
the basic feature. Patch by Andrew Dunstan, some tweaking by Tom Lane.
Also, enable %option nodefault in these two lexers, and patch some gaps
revealed thereby.
- Corrected error handling in PGTYPEStimestamp_from_asc.
- Set pgtypeslib version to 1.2.
Joe Conway [2004年2月24日 06:07:18 +0000 (06:07 +0000)]
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.
Joe Conway [2004年2月24日 05:25:36 +0000 (05:25 +0000)]
Apply quote_literal to the start_with argument of connectby. Fixes problem
reported by David Garamond when working with bytea parent and child keys.
Tom Lane [2004年2月24日 03:35:19 +0000 (03:35 +0000)]
Cause pg_dump to emit a 'SET client_encoding' command at the start of
any restore operation, thereby ensuring that dumped data is interpreted
the same way it was dumped even if the target database has a different
encoding. Per suggestions from Pavel Stehule and others. Also,
simplify scheme for handling check_function_bodies ... we may as well
just set that at the head of the script.
Tom Lane [2004年2月24日 01:44:33 +0000 (01:44 +0000)]
Don't crash when a rowtype argument to a plpgsql function is NULL.
Per report from Chris Campbell.
Tom Lane [2004年2月23日 23:55:08 +0000 (23:55 +0000)]
Fix obsolete comment.
Tom Lane [2004年2月23日 23:03:10 +0000 (23:03 +0000)]
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.
Tom Lane [2004年2月23日 20:48:03 +0000 (20:48 +0000)]
NOFILE isn't used anywhere any more.
Tom Lane [2004年2月23日 20:45:59 +0000 (20:45 +0000)]
Do a direct probe during postmaster startup to determine the maximum
number of openable files and the number already opened. This eliminates
depending on sysconf(_SC_OPEN_MAX), and allows much saner behavior on
platforms where open-file slots are used up by semaphores.
Fixed incorrect output of indicator structs using the name of the data struct.
Tom Lane [2004年2月23日 04:11:10 +0000 (04:11 +0000)]
Write #include <dl.h>, not #include "dl.h", to correctly reflect the
fact that dl.h is a system header and not one of ours.
Tom Lane [2004年2月22日 21:26:55 +0000 (21:26 +0000)]
Move responsibility for copying argv[] array into ps_status.c, where it
logically belongs. Arrange to update the _NSGetArgv() copy of the argv
pointer on Darwin. (It seems likely that other NeXT-derived platforms
also have an _NSGetArgv() problem, but until we have some reports I'll
just make this #ifdef __darwin__.)
Document the family() function (added during the 7.4 dev cycle but not
documented), and fix a typo.
Tom Lane [2004年2月21日 06:29:58 +0000 (06:29 +0000)]
Fix random build breakage from log_disconnections patch.
Tom Lane [2004年2月21日 00:34:53 +0000 (00:34 +0000)]
Implement a solution to the 'Turkish locale downcases I incorrectly'
problem, per previous discussion. Make some additional changes to
centralize the knowledge of just how identifier downcasing is done,
in hopes of simplifying any future tweaking in this area.
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,
Add:
> * Have psql show more information about sequences
Add:
> * Allow external interfaces to extend the GUC variable set
Add to PL/java description.
Tom Lane [2004年2月19日 19:40:09 +0000 (19:40 +0000)]
Re-implement psql's input scanning to use a flex-generated lexer, as per
recent discussion. The lexer is used for both SQL command text and
backslash commands. The purpose of this change is to make it easier to
track the behavior of the backend's SQL lexer --- essentially identical
flex rules are now used by psql. Also, this cleans up a lot of very
squirrelly code in mainloop.c and command.c. The flex code is somewhat
bulkier than the removed code, but should be lots easier to maintain.
Tom Lane [2004年2月19日 19:11:30 +0000 (19:11 +0000)]
Cosmetic changes (mostly whitespace) to make it easier to diff the
backend lexer against psql's.
Update:
< * Add GUC variable to prevent waiting on locks
> * Add NO WAIT option to various SQL commands
Here is a patch that implements setitimer() on win32. With this patch
applied, deadlock detection and statement_timeout now works.
The file timer.c goes into src/backend/port/win32/.
The patch also removes two lines of "printf debugging" accidentally left
in pqsignal.h, in the console control handler.
Magnus Hagander
Added missing rule for DOUBLE variables.
Improve the consistency of the error message emitted when rejecting
invalid input to the oid type. Also, remove some long-unused code
from adt/numutils.c
Remove a caveat from the "backup" documentation: pg_dump now does a
better job of handling dependencies between database objects.
Done:
> * -Change CVS ID to PostgreSQL
Add:
> o Allow the schema of objects to be changed
Add a few more <xref> tags to the SGML docs, where appropriate. Original
patch from Michael Glaesemann, additional changes by Neil Conway.
Tom Lane [2004年2月17日 07:36:47 +0000 (07:36 +0000)]
Minor editorializing on cost-based vacuum description.
Significant improvements to the documentation for the new cost-based
vacuum delay feature, including updating the docs for Tom's recent
improvements. There is still more work to be done here: for example,
adding some more information on the practical use of cost-based
vacuum delay to the "maintenance" section would probably be a good
idea.
Fix a minor SGML markup infelicity in recently-applied log_disconnections
patch.
Rename function log_session_end to log_disconnections.
Fix prototype for on_proc_exit in log_disconnections patch.
This patch brings up to date what I did last year (now unfortunately
bitrotted) to allow the logging of the end of a session, enabled by
the config setting "log_disconnections".
Andrew Dunstan
Here is an updated version of the win32 readdir patch.
1) Now puts in exactly the same change as the current-cvs mingw code
does. (see
http://cvs.sourceforge.net/viewcvs.py/mingw/runtime/mingwex/dirent.c?r1=
1.3&r2=1.4, second part of the patch).
2) Updates both xlog.c and slru.c in backend/access/transam/
3) Also updates pg_resetxlog, which also uses readdir() and checks the
errno value after the loop.
Magnus Hagander
Under Win32, stat() returns an st_ino field, but it has no meaning (on
Win2K, and possibly all Win32 variants, it is always 0). This causes a
number of problems in the dfmgr.c logic, which basically all revolve
around the fact that *any* two files will appear to have the same inode.
Claudio Natoli
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
Minor SGML markup improvements.
Tom Lane [2004年2月17日 00:52:53 +0000 (00:52 +0000)]
Make use of statistics on index expressions. There are still some
corner cases that could stand improvement, but it does all the basic
stuff. A byproduct is that the selectivity routines are no longer
constrained to working on simple Vars; we might in future be able to
improve the behavior for subexpressions that don't match indexes.
Change may -> might, and remove an extra tab.
- Cleaned up parser a little bit. It does not make sense to allow a
typename to be typedef'ed that cannot be parsed as variable type.
- Allowed some SQL keywords to be used as C variable names.
Tom Lane [2004年2月15日 21:01:39 +0000 (21:01 +0000)]
First steps towards statistics on expressional (nee functional) indexes.
This commit teaches ANALYZE to store such stats in pg_statistic, but
nothing is done yet about teaching the planner to use 'em.
Also, repair longstanding oversight in separate ANALYZE command: it
updated the pg_class.relpages and reltuples counts for the table proper,
but not for indexes.
New translation
- Allowed some C keywords to be used as SQL column names.
- Added missing braces to array parsing.
- Set ecpg version to 3.1.1.
- Removed that old debugging output that I forgot the last time.
Minor documentation tweak.
Tom Lane [2004年2月14日 20:16:18 +0000 (20:16 +0000)]
Create crosstype comparison operators for date vs. timestamp and date
vs. timestamptz. This allows use of indexes for expressions like
datecol >= date 'today' - interval '1 month'
which were formerly not indexable without casting the righthand side
down from timestamp to date.
Tom Lane [2004年2月13日 22:26:30 +0000 (22:26 +0000)]
Repair optimization bug I introduced in a moment of brain fade back in
Nov 2002: when constant-expression simplification removes all the
aggregate function calls from a query, that doesn't mean we can act as
though there never were any aggregates. Per bug report from Gabor Szucs.
Jan Wieck [2004年2月13日 12:25:09 +0000 (12:25 +0000)]
Documentation for vacuum_cost config options.
Jan
Tom Lane [2004年2月13日 06:39:49 +0000 (06:39 +0000)]
After further thought about support for gathering stats on functional
indexes, it seems like we ought to put another layer of indirection
between the compute_stats functions and the actual data storage. This
would allow us to compute the values on-the-fly, for example.
Mention psql variable names are case-sensitive.
Fix typo:
< * Allow cross-db queries with transaction sematics
> * Allow cross-db queries with transaction semantics
Tom Lane wrote:
> momjian@svr1.postgresql.org (Bruce Momjian) writes:
>> someone asked me about the FK deadlock fix, mentioned in the 7.3.3
>> release notes as 3rd change:
>> http://www.postgresql.org/docs/current/static/release-7-3-3.html
>> Actually, that fix was available with 7.4, not 7.3. Don't know if we can
>> retroactively change the release-notes though.
>
> This is completely erroneous, please undo it.
>
> 2003年05月21日 14:14 tgl
>
> * src/: backend/utils/adt/ri_triggers.c,
> test/regress/expected/foreign_key.out (REL7_3_STABLE): Back-patch
> Jan's fix to avoid primary key lookup (and lock) if foreign key
> does not change on UPDATE.
Oh ... didn't know that you did a backpatch. Sorry
Jan
Add:
> * Use nested transactions to prevent syntax errors from aborting a transaction
Add:
> * Allow temporary views on non-temporary tables
Tom Lane [2004年2月13日 01:08:20 +0000 (01:08 +0000)]
Try to make 'cross-database references are not implemented' errors a
bit more helpful by identifying the specific qualified name being
complained of.
Tom Lane [2004年2月12日 23:41:04 +0000 (23:41 +0000)]
Add hooks for type-specific calculation of ANALYZE statistics. Idea and
coding by Mark Cave-Ayland, some kibitzing by Tom Lane. initdb forced
due to new column in pg_type.
Add from Joe Conway:
> o Modify array literal representation to handle array index lower bound
> of other than one
>
183d185
<
Add CVS ID tags to port/win32/files.
Jan:
someone asked me about the FK deadlock fix, mentioned in the 7.3.3
release notes as 3rd change:
http://www.postgresql.org/docs/current/static/release-7-3-3.html
Actually, that fix was available with 7.4, not 7.3. Don't know if we can
retroactively change the release-notes though.
Tom Lane [2004年2月12日 20:07:26 +0000 (20:07 +0000)]
Avoid delaying postmaster shutdown by up to 10 seconds on platforms
where signals do not terminate sleep() delays.
Improve \? wording, remove 'internal'.
Translation updates
Add bitmap discussion to performance TODO.detail.
Remove TODO.detail files that contained useless or very old information.
Update TODO accordingly.
Done:
<
<
< Reporting
< =========
<
< * Show location of syntax error in query [yacc]
File not needed:
.< * Improve speed with indexes (perhaps recreate index instead) [vacuum]
> * Improve speed with indexes (perhaps recreate index instead)
369c369
< lock and truncate table [vacuum]
> lock and truncate table
371c371
< rather than in /contrib [vacuum]
> rather than in /contrib
Mostly done:
< * Allow better handling of numeric constants, type conversion [typeconv]
File not needed:
< * Add replication of distributed databases [replication]
> * Add replication of distributed databases
Remove:
< o http://gborg.postgresql.org/project/pgreplication/projdisplay.php
Merge files:
< * Allow persistent backends [persistent]
> * Allow persistent backends [pool]
397c397
< connection pooling
> connection pooling [pool]
Not needed:
< float4, numeric/decimal too [optimizer]
> float4, numeric/decimal too
422c422
< * Missing optimizer selectivities for date, r-tree, etc. [optimizer]
> * Missing optimizer selectivities for date, r-tree, etc
Not needed:
< * Delay fsync() when other backends are about to commit too [fsync]
> * Delay fsync() when other backends are about to commit too
Not needed:
< * Add MATCH PARTIAL referential integrity [foreign]
> * Add MATCH PARTIAL referential integrity
Remove crossdb content.
This is the main PostgreSQL git repository.
RSS
Atom