summaryrefslogtreecommitdiff
path: root/src/backend/utils
AgeCommit message (Collapse)Author
1999-09-11Eliminate query length limitation imposed by pg_client_to_serverTom Lane
and pg_server_to_client. Eliminate copy.c's restriction on the length of a single attribute.
1999-09-11Eliminate elog()'s hardwired limit on length of an error message.Tom Lane
This change seems necessary in conjunction with long queries, and it cleans up some bogosity in connection with long EXPLAIN texts anyway. Note that current libpq will accept any length error message (at least until it runs out of memory); prior versions have a limit of 8K, but will cleanly discard excess error text, so there shouldn't be any big compatibility problems with old clients.
1999-09-09Repair incorrect cleanup of heap memory allocation duringTom Lane
transaction abort --- before it only worked if there was exactly one level of allocation context stacked in the blank portal. Now it does the right thing for any depth, including zero...
1999-09-09Repair error noticed by Roberto Cornacchia: selectivity codeTom Lane
was rejecting negative attnums as bogus, which of course they are not. Add code to get_attdisbursion to produce a useful value for OID attribute, since VACUUM does not store stats for system attributes. Also, repair bug that's been in eqjoinsel for a long time: it was taking the max of the two columns' disbursions, whereas it should use the min.
1999-09-07Repair logic error in LIKE: should not return LIKE_ABORTTom Lane
when reach end of pattern before end of text. Improve code comments.
1999-09-06Fix relcache.c so that local relations (those created duringTom Lane
current transaction) are not flushed by shared-cache-inval reset message. SI reset actually works now, for probably the first time in a long time. I was able to run initdb and regression tests with a 16-element SI message array, with a lot of NOTICE: cache state reset messages but no crashes.
1999-09-06RelationCacheInvalidate thought there were 7 nailed-in-cacheTom Lane
system tables, but actually there are only 6 --- see RelationInitialize. Kinda makes you wonder how long ago this code was last executed...
1999-09-04remove elogs used for debugging.Bruce Momjian
1999-09-04Intercept temp table lookups further up to map temp names.Bruce Momjian
1999-09-04In RelationNameGetRelation(), replace temp table name byTom Lane
real name before doing lookup. We only want to index temp tables by their real names in the relcache, to ensure there's not more than one relcache entry for them.
1999-09-04Avoid transaction overhead when there are no temp tablesTom Lane
to be deleted.
1999-09-04Invalidate temp entries for aborted transactions.Bruce Momjian
1999-09-04Modify RelationFlushRelation so that if the relcache entryTom Lane
has positive refcount, it is rebuilt from pg_class data. This ensures that relcache entries will track changes made by other backends. Formerly, a shared inval report would just be ignored if it happened to arrive while the relcache entry was in use. Also, fix relcache to reset ref counts to zero during transaction abort. Finally, change LockRelation() so that it checks for shared inval reports after obtaining the lock. In this way, once any kind of lock has been obtained on a rel, we can trust the relcache entry to be up-to-date.
1999-09-02Rule deparser didn't handle unary operators correctly.Tom Lane
1999-09-02Repair a bunch of problems in md.c. This builds on Hiroshi'sTom Lane
insight that RelationFlushRelation ought to invoke smgrclose, and that the way to make that work is to ensure that mdclose doesn't fail if the relation is already closed (or unlinked, if we are looking at a DROP TABLE). While I was testing that, I was able to identify several problems that we had with multiple-segment relations. The system is now able to do initdb and pass the regression tests with a very small segment size (I had it set to 64Kb per segment for testing). I don't believe that ever worked before. File descriptor leaks seem to be gone too. I have partially addressed the concerns we had about mdtruncate(), too. On a Win32 or NFS filesystem it is not possible to unlink a file that another backend is holding open, so what md.c now does is to truncate unwanted files to zero length before trying to unlink them. The other backends will be forced to close their open files by relation cache invalidation --- but I think it would take considerable work to make that happen before vacuum truncates the relation rather than after. Leaving zero-length files lying around seems a usable compromise.
1999-08-28Fix several problems in rule deparsing: didn't handle arrayTom Lane
references or CASE expressions, didn't parenthesize complex expressions properly. Also, always output variable references as fully qualified names to eliminate ambiguity bug recently reported. (This could be smarter, but reliability comes first.)
1999-08-25Revise implementation of SubLinks so that there is a consistent,Tom Lane
documented intepretation of the lefthand and oper fields. Fix a number of obscure problems while at it --- for example, the old code failed if the parser decided to insert a type-coercion function just below the operator of a SubLink. CAUTION: this will break stored rules that contain subplans. You may need to initdb.
1999-08-24Alter AllocSet routines so that requests larger thanTom Lane
ALLOC_BIGCHUNK_LIMIT are always allocated as separate malloc() blocks, and are free()d immediately upon pfree(). Also, if such a chunk is enlarged with repalloc(), translate the operation into a realloc() so as to minimize memory usage. Of course, these large chunks still get freed automatically if the alloc set is reset. I have set ALLOC_BIGCHUNK_LIMIT at 64K for now, but perhaps another size would be better?
1999-08-21Major revision of sort-node handling: push knowledge of queryTom Lane
sort order down into planner, instead of handling it only at the very top level of the planner. This fixes many things. An explicit sort is now avoided if there is a cheaper alternative (typically an indexscan) not only for ORDER BY, but also for the internal sort of GROUP BY. It works even when there is no other reason (such as a WHERE condition) to consider the indexscan. It works for indexes on functions. It works for indexes on functions, backwards. It's just so cool... CAUTION: I have changed the representation of SortClause nodes, therefore THIS UPDATE BREAKS STORED RULES. You will need to initdb.
1999-08-21Cleanups for int8: guard against null inputs in comparisonTom Lane
operators (and some other places), fix rangechecks in int8 to int4 conversion (same problem we recently figured out in pg_atoi).
1999-08-21Ooops ... I had left some test coding in selfuncs.c thatTom Lane
failed on 'field < textconstant' ...
1999-08-16Add get_func_rettype() to general-use lsyscache routines,Tom Lane
since it's now needed in both optimizer and parser.
1999-08-09Store -1 in attdisbursion to signal 'no duplicates in column'.Tom Lane
Centralize att_disbursion readout logic.
1999-08-09Move get_attdisbursion to lsyscache. Clean up get_typdefault.Tom Lane
1999-08-02Further selectivity-estimation work. Speed up eqsel()Tom Lane
(it should just call the given operator, not look up an = operator). Fix intltsel() so that all numeric data types are converted to double before trying to estimate where the given comparison value is in the known range of column values. intltsel() still needs work, or replacement, for non-numeric data types ... but for nonintegral numeric types it should now be delivering reasonable estimates.
1999-08-01First step in fixing selectivity-estimation code. eqsel andTom Lane
neqsel now behave as per my suggestions in pghackers a few days ago. selectivity for < > <= >= should work OK for integral types as well, but still need work for nonintegral types. Since these routines have never actually executed before :-(, this may result in some significant changes in the optimizer's choices of execution plans. Let me know if you see any serious misbehavior. CAUTION: THESE CHANGES REQUIRE INITDB. pg_statistic table has changed.
1999-07-22Alpha spinlock fix from Uncle George <gatgul@voicenet.com>Bruce Momjian
1999-07-20Reverse out cache changes that are not ready yet.Bruce Momjian
1999-07-20Use -ieee alpha flag for gcc and egcs only.Bruce Momjian
1999-07-20Re-add Makefile.Bruce Momjian
1999-07-20Move -ieee to adt Makefile, and add CPU Makefile variable.Bruce Momjian
1999-07-19Install new alignment code to use MAXALIGN rather than DOUBLEALIGN whereBruce Momjian
approproate.
1999-07-19Enable WIN32 compilation of libpq.Bruce Momjian
1999-07-19Re-add getopt.h check, remove NT-specific tests for it.Bruce Momjian
1999-07-17 Move some system includes into c.h, and remove duplicates.Bruce Momjian
1999-07-17Fix for multi-byte includes.Bruce Momjian
1999-07-16Add back improperly removed #include for utils/dynamic_loader.h.Tom Lane
1999-07-16More cleanupBruce Momjian
1999-07-16More cleanupBruce Momjian
1999-07-16Final cleanupBruce Momjian
1999-07-16Final cleanup.Bruce Momjian
1999-07-16Update #include cleanupsBruce Momjian
1999-07-15Change #include's to use <> and "" as appropriate.Bruce Momjian
1999-07-15Remove unused #includes in *.c files.Bruce Momjian
1999-07-15Remove un-needed #include's from *.c files.Bruce Momjian
1999-07-15Clean up #include in /include directory. Add scripts for checking includes.Bruce Momjian
1999-07-14Cleanup of /include #include's, for 6.6 only.Bruce Momjian
1999-07-13More cpu cleanups, only for 6.6.Bruce Momjian
1999-07-11Fix some compiler warnings (Tomoaki Nishiyama), add WIN1250 support (Pavel ↵Tatsuo Ishii
Behal)
1999-07-10Fix tuplecmp() to ensure repeatable sort ordering of tuplesTom Lane
that contain null fields. Old code would produce erratic sort results because comparisons of tuples containing nulls could produce inconsistent answers.