summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2005-05-03Alter the signature for encoding conversion functions to declare theTom Lane
output area as INTERNAL not CSTRING. This is to prevent people from calling the functions by hand. This is a permanent solution for the back branches but I hope it is just a stopgap for HEAD.
2005-05-03Change tsearch2 to not use the unsafe practice of creating functionsTom Lane
that return INTERNAL without also having INTERNAL arguments. Since the functions in question aren't meant to be called by hand anyway, I just redeclared them to take 'internal' instead of 'text'. Also add code to ProcedureCreate() to enforce the restriction, as I should have done to start with :-(
2005-05-02Check the file system on postmaster startup and report any unreferencedBruce Momjian
files in the server log. Heikki Linnakangas
2005-05-02Change SPI functions to use a `long' when specifying the number of tuplesNeil Conway
to produce when running the executor. This is consistent with the internal executor APIs (such as ExecutorRun), which also use a long for this purpose. It also allows FETCH_ALL to be passed -- since FETCH_ALL is defined as LONG_MAX, this wouldn't have worked on platforms where int and long are of different sizes. Per report from Tzahi Fadida.
2005-05-01Change CREATE TYPE to require datatype output and send functions to haveTom Lane
only one argument. (Per recent discussion, the option to accept multiple arguments is pretty useless for user-defined types, and would be a likely source of security holes if it was used.) Simplify call sites of output/send functions to not bother passing more than one argument.
2005-05-01Remove the contents of the src/corba subdirectory: this has been dead codeNeil Conway
for a long time.
2005-04-30Change catalog entries for record_out and record_send to show only oneTom Lane
argument, since that's all they are using now. Adjust type_sanity regression test so that it will complain if anyone tries to define multiple-argument output functions in future.
2005-04-30Make record_out and record_send extract type information from the passedTom Lane
record object itself, rather than relying on a second OID argument to be correct. This patch just changes the function behavior and not the catalogs, so it's OK to back-patch to 8.0. Will remove the now-redundant second argument in pg_proc in a separate patch in HEAD only.
2005-04-30Use the standard lock manager to establish priority order when thereTom Lane
is contention for a tuple-level lock. This solves the problem of a would-be exclusive locker being starved out by an indefinite succession of share-lockers. Per recent discussion with Alvaro.
2005-04-30GCC 4.0 includes a new warning option, -Wformat-literal, that emitsNeil Conway
a warning when a variable is used as a format string for printf() and similar functions (if the variable is derived from untrusted data, it could include unexpected formatting sequences). This emits too many warnings to be enabled by default, but it does flag a few dubious constructs in the Postgres tree. This patch fixes up the obvious variants: functions that are passed a variable format string but no additional arguments. Most of these are harmless (e.g. the ruleutils stuff), but there is at least one actual bug here: if you create a trigger named "%sfoo", pg_dump will read uninitialized memory and fail to dump the trigger correctly.
2005-04-30Fix BCC to not define compiler location.Bruce Momjian
2005-04-29Restructure LOCKTAG as per discussions of a couple months ago.Tom Lane
Essentially, we shoehorn in a lockable-object-type field by taking a byte away from the lockmethodid, which can surely fit in one byte instead of two. This allows less artificial definitions of all the other fields of LOCKTAG; we can get rid of the special pg_xactlock pseudo-relation, and also support locks on individual tuples and general database objects (including shared objects). None of those possibilities are actually exploited just yet, however. I removed pg_xactlock from pg_class, but did not force initdb for that change. At this point, relkind 's' (SPECIAL) is unused and could be removed entirely.
2005-04-29Remove extern from optreset that was just added.Bruce Momjian
2005-04-29Improve cleanup from win32 client-only build.Bruce Momjian
2005-04-29Backpatch BCC compile changes to 8.0.X for psql.Bruce Momjian
2005-04-29This patch fixes a bug in the error message emitted by pg_restore on anNeil Conway
incorrect -F argument: write_msg() expects its first parameter to be a "module name", not the format string.
2005-04-28Implement sharable row-level locks, and use them for foreign key referencesTom Lane
to eliminate unnecessary deadlocks. This commit adds SELECT ... FOR SHARE paralleling SELECT ... FOR UPDATE. The implementation uses a new SLRU data structure (managed much like pg_subtrans) to represent multiple- transaction-ID sets. When more than one transaction is holding a shared lock on a particular row, we create a MultiXactId representing that set of transactions and store its ID in the row's XMAX. This scheme allows an effectively unlimited number of row locks, just as we did before, while not costing any extra overhead except when a shared lock actually has to be shared. Still TODO: use the regular lock manager to control the grant order when multiple backends are waiting for a row lock. Alvaro Herrera and Tom Lane.
2005-04-28Fix a whitespace problem. From Alvaro Herrera.Dennis Bjorklund
2005-04-28Add psql \set ON_ERROR_ROLLBACK to allow statements in a transaction toBruce Momjian
error without affecting the entire transaction. Valid values are "on|interactive|off".
2005-04-25On further experimentation, there were still a couple of bugs inTom Lane
ExpandIndirectionStar() ... and in markTargetListOrigin() too.
2005-04-25Fix ExpandIndirectionStar to handle cases where the expression to beTom Lane
expanded is of RECORD type, eg 'select (foo).* from (select foo(f1) from t1) ss' where foo() is a function declared with multiple OUT parameters.
2005-04-25get_expr_result_type probably needs to be able to handle OpExpr as wellTom Lane
as FuncExpr, to cover cases where a function returning tuple is invoked via an operator.
2005-04-25Avoid rechecking lossy operators twice in a bitmap scan plan.Tom Lane
2005-04-25While determining the filter clauses for an index scan (either plainTom Lane
or bitmap), use pred_test to be a little smarter about cases where a filter clause is logically unnecessary. This may be overkill for the plain indexscan case, but it's definitely useful for OR'd bitmap scans.
2005-04-25Replace slightly klugy create_bitmap_restriction() function with aTom Lane
more efficient routine in restrictinfo.c (which can make use of make_restrictinfo_internal).
2005-04-25Remove support for OR'd indexscans internal to a single IndexScan planTom Lane
node, as this behavior is now better done as a bitmap OR indexscan. This allows considerable simplification in nodeIndexscan.c itself as well as several planner modules concerned with indexscan plan generation. Also we can improve the sharing of code between regular and bitmap indexscans, since they are now working with nigh-identical Plan nodes.
2005-04-24Adjust nodeBitmapIndexscan.c to not keep the index open across calls,Tom Lane
but just to open and close it during MultiExecBitmapIndexScan. This avoids acquiring duplicate resources (eg, multiple locks on the same relation) in a tree with many bitmap scans. Also, don't bother to lock the parent heap at all here, since we must be underneath a BitmapHeapScan node that will be holding a suitable lock.
2005-04-24Actually, nodeBitmapIndexscan.c doesn't need to create a standardTom Lane
ExprContext at all, since it never evaluates any qual or tlist expressions.
2005-04-24Put back example of using Result node to execute an INSERT.Tom Lane
2005-04-24Update some comments to use SQL examples rather than QUEL. From SimonNeil Conway
Riggs.
2005-04-24Update VACUUM VERBOSE FSM message, per Tom.Bruce Momjian
2005-04-23Repair two TIME WITH TIME ZONE bugs found by Dennis Vshivkov. ComparisonTom Lane
of timetz values misbehaved in --enable-integer-datetime cases, and EXTRACT(EPOCH) subtracted the zone instead of adding it in all cases. Backpatch to all supported releases (except --enable-integer-datetime code does not exist in 7.2).
2005-04-23Remove useless argtype_inherit() code, and make consequent simplifications.Tom Lane
As I pointed out a few days ago, this code has failed to do anything useful for some time ... and if we did want to revive the capability to select functions by nearness of inheritance ancestry, this is the wrong place and way to do it anyway. The knowledge would need to go into func_select_candidate() instead. Perhaps someday someone will be motivated to do that, but I am not today.
2005-04-23Remove explicit FreeExprContext calls during plan node shutdown. TheTom Lane
ExprContexts will be freed anyway when FreeExecutorState() is reached, and letting that routine do the work is more efficient because it will automatically free the ExprContexts in reverse creation order. The existing coding was effectively freeing them in exactly the worst possible order, resulting in O(N^2) behavior inside list_delete_ptr, which becomes highly visible in cases with a few thousand plan nodes. ExecFreeExprContext is now effectively a no-op and could be removed, but I left it in place in case we ever want to put it back to use.
2005-04-23Update VACUUM VERBOSE update, per Alvaro.Bruce Momjian
2005-04-23Update working of VACUUM VERBOSE.Bruce Momjian
2005-04-23Make VACUUM VERBOSE FSM output all output in a single INFO outputBruce Momjian
statement.
2005-04-23Add comment about checkpoint panic behavior during shutdown, perTom Lane
suggestion from Qingqing Zhou.
2005-04-23Allow -2147483648 to be treated as an INT4 rather than INT8 constant.Tom Lane
Per discussion with Paul Edwards.
2005-04-23Recent changes got the sense of the notnull bit backwards in the 2.0Tom Lane
protocol output routines. Mea culpa :-(. Per report from Kris Jurka.
2005-04-23Define the right-hand input of AT TIME ZONE as a full a_expr instead ofTom Lane
c_expr. Perhaps the restriction was once needed to avoid bison errors, but it seems to work just fine now --- and even generates a slightly smaller state machine. This change allows examples like SELECT '13:45'::timetz AT TIME ZONE '-07:00'::interval; to work without parentheses around the right-hand input.
2005-04-23Modify output of VACUUM VERBOSE to be clearer.Bruce Momjian
2005-04-23Turns out that my recent elimination of the 'redundant' flatten_andors()Tom Lane
code in prepqual.c had a small drawback: the flatten_andors code was able to cope with deeply nested AND/OR structures (like 10000 ORs in a row), whereas eval_const_expressions tends to recurse until it overruns the stack. Revise eval_const_expressions so that it doesn't choke on deeply nested ANDs or ORs.
2005-04-23Teach choose_bitmap_and() to actually be choosy --- that is, try toTom Lane
make some estimate of which available indexes to AND together, rather than blindly taking 'em all. This could probably stand further improvement, but it seems to do OK in simple tests.
2005-04-23Fix bogus EXPLAIN display of rowcount estimates for BitmapAnd andTom Lane
BitmapOr nodes.
2005-04-22First cut at planner support for bitmap index scans. Lots to do yet,Tom Lane
but the code is basically working. Along the way, rewrite the entire approach to processing OR index conditions, and make it work in join cases for the first time ever. orindxpath.c is now basically obsolete, but I left it in for the time being to allow easy comparison testing against the old implementation.
2005-04-21Rethink original decision to use AND/OR Expr nodes to represent bitmapTom Lane
logic operations during planning. Seems cleaner to create two new Path node types, instead --- this avoids duplication of cost-estimation code. Also, create an enable_bitmapscan GUC parameter to control use of bitmap plans.
2005-04-21Install some slightly realistic cost estimation for bitmap index scans.Tom Lane
2005-04-20Make pg_ctl status do a kill() test to verify that the PID found inTom Lane
postmaster.pid still represents a live postmaster.
2005-04-20Don't try to run clauseless index scans on index types that don't supportTom Lane
it. Per report from Marinos Yannikos.