summaryrefslogtreecommitdiff
path: root/src/backend
AgeCommit message (Collapse)Author
2004-03-09Corrects a typo, introduces missing variables, and rearranges theBruce Momjian
initialization of stats process under EXEC_BACKEND. [A cleaner, rationalized approach to stat/backend/SSDataBase child processes under EXEC_BACKEND is on my TODO list. However this patch takes care of immediate concerns (ie. stats test now passes under win32)] Claudio Natoli
2004-03-09Determines the PKGLIBDIR equivalent under win32. Requires pgsql lib andBruce Momjian
bin directories to be packaged under the same root directory (eg. <some path>/pgsql/bin and <some path>/pgsql/lib) for the win32 port, which does not appear to be an onerous restriction. Claudio Natoli
2004-03-09Add ALSO keyword to CREATE RULE.Bruce Momjian
Fabien COELHO
2004-03-09Add:Bruce Momjian
#log_line_prefix = '' # e.g. '<%u%%%d> ' # %u=user name %d=database name # %r=remote host and port # %p=PID %t=timestamp %i=command tag # %c=session id %l=session line number # %s=session start timestamp # %x=stop here in non-session processes # %%='%' Andrew Dunstan
2004-03-08Add comment about why ON COMMENT in non-current database throws just anBruce Momjian
warning.
2004-03-08Test for whether a previous IN join restricts the current join was tooTom Lane
strict, per discussion with Dennis Haney. Also, rearrange the preceding tests to avoid redundancy.
2004-03-07When testing usability of a partial index, recognize that an indexTom Lane
predicate of the form 'foo IS NOT NULL' is implied by a WHERE clause that uses 'foo' in any strict operator or function. Per suggestion and preliminary implementation by John Siracusa; some further hacking by moi.
2004-03-05Per a brief conversation with Tom, I've created a patch for addingBruce Momjian
support for 'week' within the date_trunc function. Within the patch I added a couple of test cases and associated target output, and changed the documentation to add 'week' appropriately. Robert Creager
2004-03-05Win32:Bruce Momjian
* Mostly, casting etc to remove compilation warnings in win32 only code. * main.c: set _IONBF to stdout/stderr under win32 (under win32, _IOLBF defaults to full buffering) * pg_resetxlog/Makefile: ensures dirmod.o gets cleaned (got bitten by this when, after "make clean"ing, switching compilation between Ming + Cygwin) Claudio Natoli
2004-03-05Add new SPI functions for use by PL/Java:Bruce Momjian
+extern Oid SPI_getargtypeid(void *plan, int argIndex); +extern int SPI_getargcount(void *plan); +extern bool SPI_is_cursor_plan(void *plan); Thomas Hallgren
2004-03-05Fix log_executor_stats for non-multi queries. Backpatch to 7.4.X.Bruce Momjian
2004-03-04Emit a warning when an empty string is input to the oid, float4, andNeil Conway
float8 types. This begins the deprecation of this feature: in 7.6, this input will be rejected. Also added a new error code for warnings about deprecated features, and updated the regression tests.
2004-03-02Remove useless rebuilding of subPlan list during ExecInitNode. Wouldn'tTom Lane
have been there to start with, except for overly enthusiastic copy-and- paste ...
2004-03-02Update obsolete comment.Tom Lane
2004-03-02Junkfilter logic to force a projection step during SELECT INTO was tooTom Lane
simplistic; it recognized SELECT * FROM but not SELECT * FROM LIMIT. Per bug report from Jeff Bohmer.
2004-03-02Teach is_distinct_query to recognize that GROUP BY forces a subquery'sTom Lane
output to be distinct, if all the GROUP BY columns appear in the output. Per suggestion from Dennis Haney.
2004-02-29make_sort_from_pathkeys()'s method for choosing which of severalTom Lane
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.
2004-02-28Remove unneeded indxqual field in IndexScanState, and the useless workTom Lane
spent initializing it during indexscan startup.
2004-02-27Adjust remove_redundant_join_clauses() so that when it has a choiceTom Lane
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.
2004-02-27genericcostestimate() neglected to include qual startup cost inTom Lane
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.
2004-02-27process_implied_equality must copy the substructure of the clauses itTom Lane
is generating, to avoid problems when subselects are involved. Per report from Damon Hart.
2004-02-27Fix a few omissions in the initcap() documentation & source codeNeil Conway
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.
2004-02-25For application to HEAD, following community review.Bruce Momjian
* 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
2004-02-24Add %option nodefault to all our flex lexers. Fix a couple of rule gapsTom Lane
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-24Implement dollar-quoting in the backend lexer and psql. DocumentationTom Lane
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.
2004-02-23Replace opendir/closedir calls throughout the backend with AllocateDirTom Lane
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-23Do a direct probe during postmaster startup to determine the maximumTom Lane
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.
2004-02-23Write #include <dl.h>, not #include "dl.h", to correctly reflect theTom Lane
fact that dl.h is a system header and not one of ours.
2004-02-22Move responsibility for copying argv[] array into ps_status.c, where itTom Lane
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__.)
2004-02-21Fix random build breakage from log_disconnections patch.Tom Lane
2004-02-21Implement a solution to the 'Turkish locale downcases I incorrectly'Tom Lane
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.
2004-02-19Cosmetic changes (mostly whitespace) to make it easier to diff theTom Lane
backend lexer against psql's.
2004-02-18Here is a patch that implements setitimer() on win32. With this patchBruce Momjian
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
2004-02-18Improve the consistency of the error message emitted when rejectingNeil Conway
invalid input to the oid type. Also, remove some long-unused code from adt/numutils.c
2004-02-17Rename function log_session_end to log_disconnections.Bruce Momjian
2004-02-17Fix prototype for on_proc_exit in log_disconnections patch.Bruce Momjian
2004-02-17This patch brings up to date what I did last year (now unfortunatelyBruce Momjian
bitrotted) to allow the logging of the end of a session, enabled by the config setting "log_disconnections". Andrew Dunstan
2004-02-17Here is an updated version of the win32 readdir patch.Bruce Momjian
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
2004-02-17Under Win32, stat() returns an st_ino field, but it has no meaning (onBruce Momjian
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
2004-02-17Make use of statistics on index expressions. There are still someTom Lane
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.
2004-02-16Change may -> might, and remove an extra tab.Bruce Momjian
2004-02-15First steps towards statistics on expressional (nee functional) indexes.Tom Lane
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.
2004-02-14Create crosstype comparison operators for date vs. timestamp and dateTom Lane
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.
2004-02-13Repair optimization bug I introduced in a moment of brain fade back inTom Lane
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.
2004-02-13After further thought about support for gathering stats on functionalTom Lane
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.
2004-02-13Try to make 'cross-database references are not implemented' errors aTom Lane
bit more helpful by identifying the specific qualified name being complained of.
2004-02-12Add hooks for type-specific calculation of ANALYZE statistics. Idea andTom Lane
coding by Mark Cave-Ayland, some kibitzing by Tom Lane. initdb forced due to new column in pg_type.
2004-02-12Add CVS ID tags to port/win32/files.Bruce Momjian
2004-02-12Avoid delaying postmaster shutdown by up to 10 seconds on platformsTom Lane
where signals do not terminate sleep() delays.
2004-02-12Translation updatesPeter Eisentraut