summaryrefslogtreecommitdiff
path: root/src/backend/utils/adt
AgeCommit message (Collapse)Author
2000-06-19Clean up bogosities in pg_opclass, pg_amop, pg_amproc. There are amprocTom Lane
entries now for int8 and network hash indexes. int24_ops and int42_ops are gone. pg_opclass no longer contains multiple entries claiming to be the default opclass for the same datatype. opr_sanity regress test extended to catch errors like these in the future.
2000-06-18Reimplement nodeMaterial to use a temporary BufFile (or even memory, if theTom Lane
materialized tupleset is small enough) instead of a temporary relation. This was something I was thinking of doing anyway for performance, and Jan says he needs it for TOAST because he doesn't want to cope with toasting noname relations. With this change, the 'noname table' support in heap.c is dead code, and I have accordingly removed it. Also clean up 'noname' plan handling in planner --- nonames are either sort or materialize plans, and it seems less confusing to handle them separately under those names.
2000-06-15Final #include cleanup.Bruce Momjian
2000-06-15Clean up #include's.Bruce Momjian
2000-06-14Add () around define -1.Bruce Momjian
2000-06-14Big warnings cleanup for Solaris/GCC. Down to about 40 now, butPeter Eisentraut
we'll get there one day. Use `cat' to create aclocal.m4, not `aclocal'. Some people don't have automake installed. Only run the autoconf rule in the top-level GNUmakefile if the invoker specified `make configure', don't run it automatically because of CVS timestamp skew.
2000-06-14I had overlooked the fact that some fmgr-callable functions return voidTom Lane
--- ie, they're only called for side-effects. Add a PG_RETURN_VOID() macro and use it where appropriate. This probably doesn't change the machine code by a single bit ... it's just for documentation.
2000-06-13Another batch of fmgr updates. I think I have gotten all old-styleTom Lane
functions that take pass-by-value datatypes. Should be ready for port testing ...
2000-06-12Rename rule CURRENT to OLD in source tree. Add mapping for backwardBruce Momjian
compatiblity with old rules.
2000-06-10Update rule dumper for the brave new world of ONLY.Tom Lane
2000-06-09The enclosed patch changes the behaviour of the "ordinal" ('TH') format forBruce Momjian
to_char. I don't know about the rest of the world, but the "standard" in Australia is the following: 1st, 2nd, 3rd, 4th - 9th 10th - 19th 21st, 22nd, 23rd, 24th - 29th (similarly for 30s - 90s) 110th - 119th (and for all "teens") 121st, 122nd, 123rd, 124th - 129th I think you see the trend. The current code works fine except that it produces: 111st, 112nd, 113rd, 114th - 119th 211st, 212nd, 213rd, 214th - 219th ... and so on. Without knowing anything about what's supported (and what isn't) in the usual I18N libraries, should this type of behaviour be defined within the locales? Daniel Baldoni
2000-06-09Another round of updates for new fmgr, mostly in the datetime code.Tom Lane
2000-06-08Mark functions as static and ifdef NOT_USED as appropriate.Bruce Momjian
2000-06-05Latest round of fmgr updates. All functions with bool,char, or int2Tom Lane
inputs have been converted to newstyle. This should go a long way towards fixing our portability problems with platforms where char and short parameters are passed differently from int-width parameters. Still more to do for the Alpha port however.
2000-06-02Remove NT-specific file open defines by defining our own open macros forBruce Momjian
"rb" and "wb".
2000-05-30Third round of fmgr updates: eliminate calls using fmgr() andTom Lane
fmgr_faddr() in favor of new-style calls. Lots of cleanup of sloppy casts to use XXXGetDatum and DatumGetXXX ...
2000-05-30Remove unused include files. Do not touch /port or includes used by defines.Bruce Momjian
2000-05-29Convert array_map to use new fmgr interface.Tom Lane
2000-05-29Repair problems with overrun of timezone name length. Increase MAXTZLENTom Lane
to 10, and be consistent about whether it counts the trailing null (it does not). Also increase MAXDATELEN to be sure no buffer overflows are caused by the longer MAXTZLEN.
2000-05-29Generated header files parse.h and fmgroids.h are now copied intoTom Lane
the src/include tree, so that -I backend is no longer necessary anywhere. Also, clean up some bit rot in contrib tree.
2000-05-29Second round of fmgr changes: triggers are now invoked in new style,Tom Lane
CurrentTriggerData is history.
2000-05-28First round of changes for new fmgr interface. fmgr itself and theTom Lane
key call sites are changed, but most called functions are still oldstyle. An exception is that the PL managers are updated (so, for example, NULL handling now behaves as expected in plperl and plpgsql functions). NOTE initdb is forced due to added column in pg_proc.
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-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-13Tweak selectivity for area-based operators. Still a crock...Tom Lane
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-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-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-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.