summaryrefslogtreecommitdiff
path: root/src/backend/utils
AgeCommit message (Collapse)Author
2000-09-23Back-patch fix for erroneous use of strcmp().Tom Lane
2000-09-23Back-patch fix for erroneous selectivity of not-equals.Tom Lane
2000-09-23Apply Jeroen van Vianen's patch for failure to check heap_openr failureTom Lane
in RI triggers. This is fixed in another way in current sources, but might as well apply this patch to REL7_0 branch so that 7.0.3 need not suffer this crash.
2000-07-26SELECT ... FOR UPDATE neglects duplicate key checking.Tatsuo Ishii
patches submitted by Hiroshi Inoue.
2000-07-07Back-patch StrNCpy fix.Tom Lane
2000-06-06Backpatch SearchSysCacheTupleCopy fix for init_fcache.Tom Lane
2000-05-29Back-patch tz name length fixes into REL7_0.Tom Lane
2000-05-28array_map() needs to guard against a NULL input array. This problemTom Lane
should go away in 7.1 with the new fmgr, but for 7.0.1 ...
2000-05-28Make EUC_CN support more robust.Tatsuo Ishii
2000-05-26Reduce eqsel()'s fudge-factor for estimating the frequency of valuesTom Lane
other than the most common value in a column. We had had 0.5, make it 0.1 to make it more likely that an indexscan will be chosen. Really need better statistics instead, but this should stem the bleeding meanwhile ...
2000-05-26Fix too long syslog message problemTatsuo Ishii
2000-05-22I am attempting to integrate postgres (v 7.0) with an open sourceBruce Momjian
project I am working on (Recall - a distributed, fault-tolerant, replicated, storage framework @ http://www.fault-tolerant.org). Recall is written in C++. I need to include the postgres headers and there are some problems when including the headers w/C++. Attached is a patch generated from postgres/src that fixes my problems. I was hoping to get this into the main source. It's very small (2k) and 3 files are changed: backend/utils/fmgr/fmgr.c, backend/utils/Gen_fmgrtab.sh.in, and include/access/tupdesc.h. In C++, you get a multiply defined symbol because the variable (FmgrInfo *fmgr_pl_finfo) is defined in the header (the patch moves it to the .c file). The other problem in tupdesc.h is the use of typeid is a problem in c++ (I renamed it to oidtypeid). Thanks, Neal Norwitz
2000-05-21Repair memory leaks that caused CacheCxt to grow without bound. WeTom Lane
really ought to fix relcache entry construction so that it does not do so much with CurrentMemoryContext = CacheCxt. As is, relatively harmless leaks in either sequential or index scanning translate to permanent leaks if they occur when called from relcache build. For the moment, however, the path of least resistance is to repair all such leaks...
2000-05-21Add debug code to aid in memory-leak tracking: if SHOW_MEMORY_STATS isTom Lane
defined then statistics about memory usage of all the global memory contexts are printed after each commit.
2000-05-20Clean up grotty references to CacheCxt (externs inside functions,Tom Lane
duplicate global declarations, no points for style at all!)
2000-05-20Enhance multibyte support.Tatsuo Ishii
SJIS UDC (NEC selection IBM kanji) support contributed by Eiji Tokuya
2000-05-16Several compilation and run-time problems occur when building on SGIBruce Momjian
IRIX systems using the native compilers. A summary is: - Various files use "//" as a comment delimiter in c files. - Problems caused by assuming "char" is signed. cash.in: building -signed the rules regression test fails as described in FAQ_QNX4. If CHAR_MAX is "255U" then ((signed char)CHAR_MAX) is -1. postmaster.c: random number regression test failed without this change. - Some generic build issues and warning message cleanup. David Kaelbling
2000-05-16Remove configure check for how to abbreviate 'tr A-Z a-z', and insteadTom Lane
just use the portable form, tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz There were a bunch of places that weren't paying attention to configure's result anyway (including configure itself!?); clean them up too.
2000-05-13Tweak selectivity for area-based operators. Still a crock...Tom Lane
2000-05-05Make the indexes on pg_group be shared system relations.Tom Lane
2000-05-02Modify getdatabaseencoding(), pg_encoding_to_char()Tatsuo Ishii
pg_char_to_encoding() in multibyte disbaled case so that it does not throw an error, rather return HARD CODED default value (currently SQL_ASCII). This would solve the "non-mb backend vs. mb-enabled frontend" problem.
2000-04-20Clean up const-vs-not-const compiler warning in MULTIBYTE code.Tom Lane
'Twas my fault, I think.
2000-04-16Add new selectivity estimation functions for pattern-matching operatorsTom Lane
(LIKE and regexp matches). These are not yet referenced in pg_operator, so by default the system will continue to use eqsel/neqsel. Also, tweak convert_to_scalar() logic so that common prefixes of strings are stripped off, allowing better accuracy when all strings in a table share a common prefix.
2000-04-15elog(NOTICE) during COPY incorrectly reset lineno to 0, causing anyTom Lane
subsequent elogs() in the same COPY operation to display the wrong line number. Fix is to clear lineno only when elog level is such that we will not return to caller.
2000-04-14Fix (well, add) support for ISO "week" in date_part(). Needed for ODBC.Thomas G. Lockhart
Fix spelling of "millennium". Thanks to Mika Nystrom <mika@camembert.cs.caltech.edu> for spotting this.
2000-04-12Ye-old pgindent run. Same 4-space tabs.Bruce Momjian
2000-04-10The constant in backend/utils/misc/trace.c, line 32 limits the length ofBruce Momjian
logged queries to 1024, truncating longer queries. That is about half of the size I need (I have a union that is 2K long). Can someone consider bumping it to 4K or so? Patch attached... Regards, Ed Loehr
2000-04-09Further tweaking of indexscan cost estimates.Tom Lane
2000-04-08Add zpbit and varbit data types from Adrian JoubertThomas G. Lockhart
<a.joubert@albourne.com>.
2000-04-07Update create_rule manual page.Bruce Momjian
2000-04-07Add transcendental math functions (sine, cosine, etc)Thomas G. Lockhart
Add a random number generator and seed setter (random(), SET SEED) Fix up the interval*float8 math to carry partial months into the time field. Add float8*interval so we have symmetry in the available math. Fix the parser and define.c to accept SQL92 types as field arguments. Fix the parser to accept SQL92 types for CREATE TYPE, etc. This is necessary to allow... Bit/varbit support in contrib/bit cleaned up to compile and load cleanly. Still needs some work before final release. Implement the "SOME" keyword as a synonym for "ANY" per SQL92. Implement ascii(text), ichar(int4), repeat(text,int4) to help support the ODBC driver. Enable the TRUNCATE() function mapping in the ODBC driver.
2000-03-31Fix low-probability bug in relcache startup: write_irels wrote theTom Lane
pg_internal.init file in-place, which meant that if another backend started at about the same time, it might read the incomplete file. init_irels tries to guard against that, but I have now seen a crash due to reading bad data from a partly-written file. (This may indicate a kernel bug on my platform? Not sure.) Anyway, clearly the safest course is to write the new pg_internal.init file under a unique temporary filename, and rename it into place only after it's all written.
2000-03-30Tweak indexscan cost estimation: round estimated # of tuples visited upTom Lane
to next integer. Previously, if selectivity was small, we could compute very tiny scan cost on the basis of estimating that only 0.001 tuple would be fetched, which is silly. This naturally led to some rather silly plans...
2000-03-29Change rules for interpreting date/time input to disallow 1 and 3 characterThomas G. Lockhart
years. Rejects dates like '0.085', which were accepted previously.
2000-03-24Rename bytea functions to not have upper-case letters in their names.Tom Lane
Clean up grotty coding in them, too. AFAICS from the CVS logs, these have been broken since Postgres95, so I'm not going to insist on an initdb to fix them now...
2000-03-23Float-to-int conversion functions should return NULL when given NULLTom Lane
input, not throw a gratuitous elog().
2000-03-23Improve selectivity estimation involving string constants: pay attentionTom Lane
to more than one character, and try to do the right thing in non-ASCII locales.
2000-03-20Reverse out BYTEA type coersion.Bruce Momjian
2000-03-20Update for BYTEAOID.Bruce Momjian
2000-03-20Add compatiblity information for bytea.Bruce Momjian
2000-03-19cash_words_out function truncated its output by 1 character due toTom Lane
incorrect use of StrNCpy.
2000-03-18Clean up minor compiler warnings.Tom Lane
2000-03-17Fix a bunch of minor portability problems and maybe-bugs revealed byTom Lane
running gcc and HP's cc with warnings cranked way up. Signed vs unsigned comparisons, routines declared static and then defined not-static, that kind of thing. Tedious, but perhaps useful...
2000-03-16Support full POSIX-style time zone: EST+3, PST-3, etc.Thomas G. Lockhart
We probably support a superset of the spec, but I don't have the spec to confirm this. Update regression tests to include tests for this format.
2000-03-16 Hi,Bruce Momjian
small changes in formatting.c code (better memory usage ...etc.) and better to_char's cache (will fastly for more to_char()s in one query). (It is probably end of to_char() development in 7.0 cycle.) Karel
2000-03-15Update comment obsoleted by Thomas's latest fixes.Tom Lane
2000-03-15Fix busted TRANSLATE() code --- it coredumped due to pfree()'ing theTom Lane
wrong pointer.
2000-03-14Implement column aliases on views "CREATE VIEW name (collist)".Thomas G. Lockhart
Implement TIME WITH TIME ZONE type (timetz internal type). Remap length() for character strings to CHAR_LENGTH() for SQL92 and to remove the ambiguity with geometric length() functions. Keep length() for character strings for backward compatibility. Shrink stored views by removing internal column name list from visible rte. Implement min(), max() for time and timetz data types. Implement conversion of TIME to INTERVAL. Implement abs(), mod(), fac() for the int8 data type. Rename some math functions to generic names: round(), sqrt(), cbrt(), pow(), etc. Rename NUMERIC power() function to pow(). Fix int2 factorial to calculate result in int4. Enhance the Oracle compatibility function translate() to work with string arguments (from Edwin Ramirez). Modify pg_proc system table to remove OID holes.
2000-03-13Extend numeric_round and numeric_trunc to accept negative scale inputsTom Lane
(ie, allow rounding to occur at a digit position left of the decimal point). Apparently this is how Oracle handles it, and there are precedents in other programming languages as well.
2000-03-13Remove unnecessary limitations on lengths of bpchar and varchar constants.Tom Lane
Since we detect oversize tuples elsewhere, I see no reason not to allow string constants that are 'too long' --- after all, they might never get stored in a tuple at all.