summaryrefslogtreecommitdiff
path: root/src/backend/utils
Commit message (Collapse)AuthorAgeFilesLines
* Back-patch fix for crash in GetRawDatabaseInfo(), just in case someoneTom Lane2001-01-141-2/+2
| | | | else needs it.
* Fix a bug in conversion from big5 to EUC_TW (CNS 11643-1992 Plane 3)Tatsuo Ishii2000-12-091-2/+2
| | | | Thanks Chih-Chang Hsieh <cch@cc.kmu.edu.tw> for finding the bug.
* Fix bugs in EUC_TW support. This fix includes patches contributedTatsuo Ishii2000-11-171-4/+11
| | | | | by Chih-Chang Hsi. See "A Patch for MIC to EUC_TW code converting in mb support" posting in pgsql-patches list dated 09 Nov 2000.
* Stopgap patch for problem with cursors using hash joins: an ABORTTom Lane2000-11-101-1/+7
| | | | | | | | | would cause two attempts to delete the hashtable portal, one from query shutdown and one from portalmem.c. Fix by making hash portals be treated as 'special' portal names, so that CollectNamedPortals will not think it should delete them. This code is in need of complete rewrite (and is already largely rewritten in current sources), but still need to put a finger in the dike for 7.0.*.
* Fix for inserting/copying longer multibyte strings into bpchar dataTatsuo Ishii2000-11-021-4/+25
| | | | types.
* Fix to_char() to avoid coredump on NULL input. Not needed in currentTom Lane2000-10-221-2/+14
| | | | sources due to fmgr rewrite, but 7.0.3 can use the patch...
* Fix time_larger, time_smaller, timetz_larger, timetz_smaller to meetTom Lane2000-10-191-5/+25
| | | | | | nodeAgg.c's expectation that aggregate transition functions never return pointers to their input values. This is fixed in a much better way in current sources, but in 7.0.* it's gotta be done like this.
* Back-patch fix for AM/PM boundary problem in to_char().Tom Lane2000-10-191-13/+71
| | | | Fix from Karel Zak, 10/18/00.
* Back-patch fix for erroneous use of strcmp().Tom Lane2000-09-231-2/+2
|
* Back-patch fix for erroneous selectivity of not-equals.Tom Lane2000-09-231-2/+17
|
* Apply Jeroen van Vianen's patch for failure to check heap_openr failureTom Lane2000-09-231-2/+74
| | | | | | 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.
* SELECT ... FOR UPDATE neglects duplicate key checking.Tatsuo Ishii2000-07-261-1/+5
| | | | patches submitted by Hiroshi Inoue.
* Back-patch StrNCpy fix.Tom Lane2000-07-073-11/+15
|
* Backpatch SearchSysCacheTupleCopy fix for init_fcache.Tom Lane2000-06-061-4/+7
|
* Back-patch tz name length fixes into REL7_0.Tom Lane2000-05-292-12/+9
|
* array_map() needs to guard against a NULL input array. This problemTom Lane2000-05-281-1/+5
| | | | should go away in 7.1 with the new fmgr, but for 7.0.1 ...
* Make EUC_CN support more robust.Tatsuo Ishii2000-05-281-2/+6
|
* Reduce eqsel()'s fudge-factor for estimating the frequency of valuesTom Lane2000-05-261-3/+6
| | | | | | | 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 ...
* Fix too long syslog message problemTatsuo Ishii2000-05-261-1/+81
|
* I am attempting to integrate postgres (v 7.0) with an open sourceBruce Momjian2000-05-222-5/+6
| | | | | | | | | | | | | | | | | | | | 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
* Repair memory leaks that caused CacheCxt to grow without bound. WeTom Lane2000-05-211-22/+23
| | | | | | | | | 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...
* Add debug code to aid in memory-leak tracking: if SHOW_MEMORY_STATS isTom Lane2000-05-212-5/+60
| | | | | defined then statistics about memory usage of all the global memory contexts are printed after each commit.
* Clean up grotty references to CacheCxt (externs inside functions,Tom Lane2000-05-201-2/+2
| | | | duplicate global declarations, no points for style at all!)
* Enhance multibyte support.Tatsuo Ishii2000-05-201-1181/+425
| | | | SJIS UDC (NEC selection IBM kanji) support contributed by Eiji Tokuya
* Several compilation and run-time problems occur when building on SGIBruce Momjian2000-05-162-5/+51
| | | | | | | | | | | | 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
* Remove configure check for how to abbreviate 'tr A-Z a-z', and insteadTom Lane2000-05-161-4/+4
| | | | | | | 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.
* Tweak selectivity for area-based operators. Still a crock...Tom Lane2000-05-131-3/+3
|
* Make the indexes on pg_group be shared system relations.Tom Lane2000-05-051-1/+4
|
* Modify getdatabaseencoding(), pg_encoding_to_char()Tatsuo Ishii2000-05-021-6/+3
| | | | | | 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.
* Clean up const-vs-not-const compiler warning in MULTIBYTE code.Tom Lane2000-04-201-3/+3
| | | | 'Twas my fault, I think.
* Add new selectivity estimation functions for pattern-matching operatorsTom Lane2000-04-161-199/+1228
| | | | | | | | (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.
* elog(NOTICE) during COPY incorrectly reset lineno to 0, causing anyTom Lane2000-04-151-3/+4
| | | | | | 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.
* Fix (well, add) support for ISO "week" in date_part(). Needed for ODBC.Thomas G. Lockhart2000-04-142-13/+44
| | | | | Fix spelling of "millennium". Thanks to Mika Nystrom <mika@camembert.cs.caltech.edu> for spotting this.
* Ye-old pgindent run. Same 4-space tabs.Bruce Momjian2000-04-1252-5770/+7388
|
* The constant in backend/utils/misc/trace.c, line 32 limits the length ofBruce Momjian2000-04-101-1/+1
| | | | | | | | | 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
* Further tweaking of indexscan cost estimates.Tom Lane2000-04-091-3/+12
|
* Add zpbit and varbit data types from Adrian JoubertThomas G. Lockhart2000-04-082-2/+942
| | | | <a.joubert@albourne.com>.
* Update create_rule manual page.Bruce Momjian2000-04-071-93/+360
|
* Add transcendental math functions (sine, cosine, etc)Thomas G. Lockhart2000-04-073-121/+423
| | | | | | | | | | | | | | | | 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.
* Fix low-probability bug in relcache startup: write_irels wrote theTom Lane2000-03-311-4/+23
| | | | | | | | | | 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.
* Tweak indexscan cost estimation: round estimated # of tuples visited upTom Lane2000-03-301-3/+5
| | | | | | | 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...
* Change rules for interpreting date/time input to disallow 1 and 3 characterThomas G. Lockhart2000-03-291-4/+13
| | | | years. Rejects dates like '0.085', which were accepted previously.
* Rename bytea functions to not have upper-case letters in their names.Tom Lane2000-03-241-52/+63
| | | | | | 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...
* Float-to-int conversion functions should return NULL when given NULLTom Lane2000-03-231-9/+9
| | | | input, not throw a gratuitous elog().
* Improve selectivity estimation involving string constants: pay attentionTom Lane2000-03-231-28/+96
| | | | | to more than one character, and try to do the right thing in non-ASCII locales.
* Reverse out BYTEA type coersion.Bruce Momjian2000-03-201-2/+1
|
* Update for BYTEAOID.Bruce Momjian2000-03-201-2/+2
|
* Add compatiblity information for bytea.Bruce Momjian2000-03-201-2/+3
|
* cash_words_out function truncated its output by 1 character due toTom Lane2000-03-191-2/+2
| | | | incorrect use of StrNCpy.
* Clean up minor compiler warnings.Tom Lane2000-03-181-2/+2
|