summaryrefslogtreecommitdiff
path: root/src/backend/utils/adt
AgeCommit message (Collapse)Author
2002-01-08Fix lpad() and rpad() to produce correct results in variable-lengthTom Lane
multibyte encodings.
2002-01-04Have to_date() call timestamptz_date() per Karel's email instructions.Thomas G. Lockhart
Fixes time zone problems introduced by Thomas' implementation of TIMESTAMP WITHOUT TIME ZONE which caused the behavior of the previously appropriate routine, timestamp_date(), to change for the worse in this context.
2002-01-03Guard against roundoff errors in new selectivity-estimation code,Tom Lane
per bug report from Laurette Cisneros.
2002-01-02Fix to_timestamp/to_date so that zero year input for Y, YY, or YYYTom Lane
formats will be taken as 2000, not year zero. Per bug report from Aasmund Midttun Godal. Fix from Karel Zak.
2002-01-01Rename TIME token to ISOTIME to eliminate conflict with gram.y parserThomas G. Lockhart
token. Seems to be isolated to datetime.c and datetime.h.
2001-12-30Make sure that all <ctype.h> routines are called with unsigned charTom Lane
values; it's not portable to call them with signed chars. I recall doing this for the last release, but a few more uncasted calls have snuck in.
2001-12-29Fix newly introduced datetime.c compile failure; not enough parens.Bruce Momjian
2001-12-29Check a bit more carefully for preceeding ISO field tagsThomas G. Lockhart
when decoding date fields.
2001-12-29Rework the date/time parsing to tighten up some cases and to enable otherThomas G. Lockhart
cases which should have worked but did not. Now supports julian day (J2452271), ISO time labels (T040506) and various combinations of spaces and run-togethers of dates, times, and time zones. All regression tests pass, and I have more tests to add after the 7.2 release (don't want to require changes to the ancillary horology result files until after then).
2001-12-21Add full name of the month of July to the lookup table.Thomas G. Lockhart
Thanks to Greg Sabino Mullane <greg@turnstep.com> for finding the problem.
2001-12-11Repair roundoff-error problem for stddev/variance results near zero,Tom Lane
per complaint from Kemin Zhou. Fix lack of precision in numeric stddev/variance.
2001-12-10Repair case-conversion error in to_date's handling of roman numerals.Tom Lane
From Manuel Sugawara, approved by Karel Zak.
2001-12-05Fix for usage of spirntf in more portable way.Tatsuo Ishii
2001-11-29Fix array_out's failure to backslash backslashes, per bug# 524. Also,Tom Lane
remove brain-dead rule that double quotes are needed if and only if the datatype is pass-by-reference; neither direction of the implication holds water. Instead, examine the actual data string to see if it contains any characters that force us to quote it. Add some documentation about quoting of array values, which was previously explained nowhere AFAICT.
2001-11-26Change display of FieldSelect nodes from arg.field to field(arg),Tom Lane
per bug report from Stefan Hadjistoytchev. There are some cases where the dot notation works, but there are more where it doesn't. Eventually ought to consider fixing the parser to allow cases like func().field, but for now this is the simplest patch.
2001-11-26Repair problem with listing rules that have a WHERE condition andTom Lane
have an INSERT...SELECT as the first or only action. Per bug report from Sergio Pili.
2001-11-24Tweak int8in to accept -9223372036854775808, per recent discussion inTom Lane
pgsql-patches.
2001-11-21Spell 'precedes', 'preceding' correctly in various places.Tom Lane
2001-11-21Tweak interval_avg support to avoid coredump with Alpha/Tru64 compiler.Tom Lane
Per report from Bernd Tegge.
2001-11-21Add a few new time zones, and list every time zone mentioned in myThomas G. Lockhart
Linux box's time zone database. Do not allow 'current' as a date/time input value.
2001-11-21Repair swapped sign for time minus time routine (time_mi_time()).Thomas G. Lockhart
Problem reported by Manuel Sugawara (masm@fciencias.unam.mx).
2001-11-19Tweak format_type so that we get good behavior for both column typeTom Lane
display (with a typemod) and function arg/result type display (without a typemod).
2001-11-19Fix arg coerect match text type, per Tom.Bruce Momjian
2001-11-19Make text octet_length() return non-compressed length to be consistentBruce Momjian
with other data types, per disucssion. Encoding issue still open.
2001-11-19Grammatical and spelling fixes.Tom Lane
2001-11-18Optimization for bpcharlen, textlen, varcharlen in case of single byteTatsuo Ishii
encodings.
2001-11-17Fix performance problems in TOAST compressor. The management ofTom Lane
search lists was broken in such a way that only the most recent instance of a given hash code would ever be searched, thus possibly missing longer matches further back. Fixing this gave 5 to 10% compression improvement on some text test cases. Additional small tweaks to improve speed of inner loops a little bit. There is no compatibility issue created by this change, since the compressed data format and decompression algorithm don't change.
2001-11-16IsSystemRelationName() treats TOAST relations as system relations.Tom Lane
This seems the right thing for most usages, but I notice two places where it is the wrong thing. One is that the default permissions on TOAST rels should be no-access, not world-readable; the other is that PrepareForTupleInvalidation doesn't really need to spend time looking at tuples of TOAST relations.
2001-11-12Tweak parser so that there is a defined representation for datatypesTom Lane
bpchar, bit, numeric with typmod -1. Alter format_type so that this representation is printed when the typmod is -1. This ensures that tables having such columns can be pg_dump'd and reloaded correctly. Also, remove the rather useless and non-SQL-compliant default precision and scale for type NUMERIC. A numeric column declared as such (with no precision/scale) will now have typmod -1 which means that numeric values of any precision/scale can be stored in it, without conversion to a uniform scale. This seems significantly more useful than the former behavior. Part of response to bug #513.
2001-11-12 Tables without oids wouldn't be able to beBruce Momjian
used inside fk constraints, since some of the checks in the trigger did a SELECT oid. Since the oid wasn't actually used, I changed this to SELECT 1. My test case with non-oid tables now works and fk regression appears to run fine on my machine. Stephan Szabo
2001-11-12Make ALTER TABLE RENAME update foreign-key trigger arguments correctly.Tom Lane
Brent Verner, with review and kibitzing from Tom Lane.
2001-11-08Add casts to suppress compiler warnings observed on Darwin platformTom Lane
(surprised no one has reported these yet...)
2001-11-06Add British Double Standard Time (BDST) per mailing list report.Thomas G. Lockhart
2001-11-05New pgindent run with fixes suggested by Tom. Patch manually reviewed,Bruce Momjian
initdb/regression tests pass.
2001-10-28Another pgindent run. Fixes enum indenting, and improves #endifBruce Momjian
spacing. Also adds space for one-line comments.
2001-10-25Add int2-to-int8 and int8-to-int2 conversion routines. Needed to avoidTom Lane
breaking existing pg_dump scripts, which try to assign the result of count(*) to an int2 variable. catversion bumped.
2001-10-25pgindent run on all C files. Java run to follow. initdb/regressionBruce Momjian
tests pass.
2001-10-25Add do { ... } while (0) to more bad macros.Bruce Momjian
2001-10-23Add support for INTERVAL's new typmod values to format_type.Tom Lane
2001-10-20Fix transposed arguments for typmod for one INTERVAL production.Thomas G. Lockhart
Mask both typmod subfields for INTERVAL to avoid setting the high bit, per dire warning from Tom Lane. Clear tmask for DTK_ISO_TIME case to avoid time zone troubles. Symptom reported by Tom Lane. Clean up checking for valid time zone info in output routine. This should now work for both SQL99 and Unix-style time zones. Put in explicit check for INTERVAL() typmod rounding to avoid accumulating cruft in the lower bits. Not sure that this helps, but we'll need to do something. The symptom is visible with a query like select interval(2) '10000 days 01:02:03.040506'; Regression tests are patched to repair the Tom Lane symptom, and all pass.
2001-10-18Didn't compile on non-HAVE_TM_ZONE machines.Tom Lane
2001-10-18Repair missing brace in HAVE_INT_TIMEZONE case.Tom Lane
2001-10-18Accept an INTERVAL argument for SET TIME ZONE per SQL99.Thomas G. Lockhart
Modified the parser and the SET handlers to use full Node structures rather than simply a character string argument. Implement INTERVAL() YEAR TO MONTH (etc) syntax per SQL99. Does not yet accept the goofy string format that goes along with, but this should be fairly straight forward to fix now as a bug or later as a feature. Implement precision for the INTERVAL() type. Use the typmod mechanism for both of INTERVAL features. Fix the INTERVAL syntax in the parser: opt_interval was in the wrong place. INTERVAL is now a reserved word, otherwise we get reduce/reduce errors. Implement an explicit date_part() function for TIMETZ. Should fix coersion problem with INTERVAL reported by Peter E. Fix up some error messages for date/time types. Use all caps for type names within message. Fix recently introduced side-effect bug disabling 'epoch' as a recognized field for date_part() etc. Reported by Peter E. (??) Bump catalog version number. Rename "microseconds" current transaction time field from ...Msec to ...Usec. Duh! date/time regression tests updated for reference platform, but a few changes will be necessary for others.
2001-10-13Make selectivity routines cope gracefully with NaNs, infinities, andTom Lane
NUMERIC values that are out of the range of 'double'. Per trouble report from Mike Quinn.
2001-10-13path_inter, path_distance, path_length, dist_ppath now do the rightTom Lane
things with closed paths --- ie, include the closing line segment in their calculations. Per bug report from Curtis Barrett 9-Oct-01.
2001-10-11Suppress gcc warnings.Tom Lane
2001-10-10Remove gratuitous discrepancy between extract() and date_part(),Peter Eisentraut
regarding timezone_hour, timezone_minute vs. tz_hour, tz_minute. Document the former.
2001-10-08Fix ruleutils to depend on format_type, rather than having a privateTom Lane
copy of code that knows about displaying types with typmod info. Needed so that it does the right thing with timestamp datatypes now.
2001-10-06Rearrange fmgr.c and relcache so that it's possible to keep FmgrInfoTom Lane
lookup info in the relcache for index access method support functions. This makes a huge difference for dynamically loaded support functions, and should save a few cycles even for built-in ones. Also tweak dfmgr.c so that load_external_function is called only once, not twice, when doing fmgr_info for a dynamically loaded function. All per performance gripe from Teodor Sigaev, 5-Oct-01.
2001-10-05Further cleanup of dynahash.c API, in pursuit of portability andTom Lane
readability. Bizarre '(long *) TRUE' return convention is gone, in favor of just raising an error internally in dynahash.c when we detect hashtable corruption. HashTableWalk is gone, in favor of using hash_seq_search directly, since it had no hope of working with non-LONGALIGNable datatypes. Simplify some other code that was made undesirably grotty by promixity to HashTableWalk.