aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt
Commit message (Collapse)AuthorAge
* Add casts to suppress compiler warnings observed on Darwin platformTom Lane2001-11-08
| | | | (surprised no one has reported these yet...)
* Add British Double Standard Time (BDST) per mailing list report.Thomas G. Lockhart2001-11-06
|
* New pgindent run with fixes suggested by Tom. Patch manually reviewed,Bruce Momjian2001-11-05
| | | | initdb/regression tests pass.
* Another pgindent run. Fixes enum indenting, and improves #endifBruce Momjian2001-10-28
| | | | spacing. Also adds space for one-line comments.
* Add int2-to-int8 and int8-to-int2 conversion routines. Needed to avoidTom Lane2001-10-25
| | | | | breaking existing pg_dump scripts, which try to assign the result of count(*) to an int2 variable. catversion bumped.
* pgindent run on all C files. Java run to follow. initdb/regressionBruce Momjian2001-10-25
| | | | tests pass.
* Add do { ... } while (0) to more bad macros.Bruce Momjian2001-10-25
|
* Add support for INTERVAL's new typmod values to format_type.Tom Lane2001-10-23
|
* Fix transposed arguments for typmod for one INTERVAL production.Thomas G. Lockhart2001-10-20
| | | | | | | | | | | | | | 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.
* Didn't compile on non-HAVE_TM_ZONE machines.Tom Lane2001-10-18
|
* Repair missing brace in HAVE_INT_TIMEZONE case.Tom Lane2001-10-18
|
* Accept an INTERVAL argument for SET TIME ZONE per SQL99.Thomas G. Lockhart2001-10-18
| | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Make selectivity routines cope gracefully with NaNs, infinities, andTom Lane2001-10-13
| | | | | NUMERIC values that are out of the range of 'double'. Per trouble report from Mike Quinn.
* path_inter, path_distance, path_length, dist_ppath now do the rightTom Lane2001-10-13
| | | | | things with closed paths --- ie, include the closing line segment in their calculations. Per bug report from Curtis Barrett 9-Oct-01.
* Suppress gcc warnings.Tom Lane2001-10-11
|
* Remove gratuitous discrepancy between extract() and date_part(),Peter Eisentraut2001-10-10
| | | | | regarding timezone_hour, timezone_minute vs. tz_hour, tz_minute. Document the former.
* Fix ruleutils to depend on format_type, rather than having a privateTom Lane2001-10-08
| | | | | copy of code that knows about displaying types with typmod info. Needed so that it does the right thing with timestamp datatypes now.
* Rearrange fmgr.c and relcache so that it's possible to keep FmgrInfoTom Lane2001-10-06
| | | | | | | | | 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.
* Further cleanup of dynahash.c API, in pursuit of portability andTom Lane2001-10-05
| | | | | | | | | 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.
* Define CEST as a synonym for Central European Savings TimeThomas G. Lockhart2001-10-05
| | | | | per Jan Varga <varga@utcru.sk> Fix up spacing and formatting.
* Ooops, I was a little too enthusiastic about suppressing defaultTom Lane2001-10-04
| | | | | index opclasses; they might be default for some other datatype, in which case we mustn't suppress 'em.
* Make the world safe for atttypmod=0 ... this didn't use to mean anything,Tom Lane2001-10-04
| | | | but timestamp now wants it to mean something.
* Make current_time deliver a fractional-second answer.Tom Lane2001-10-04
|
* AdjustTimeForTypmod has the same bug ...Tom Lane2001-10-04
|
* Fix some problems in new variable-resolution-timestamp code.Tom Lane2001-10-04
|
* Add dependency for like.cTatsuo Ishii2001-10-04
|
* Optimization for single byte encodings.Tatsuo Ishii2001-10-04
|
* Teach format_type about time/timestamp precision, so that pg_dump andTom Lane2001-10-03
| | | | psql's \d option work properly.
* Add missing TIMESTAMPTZ case.Tom Lane2001-10-03
|
* AdjustTimestampForTypmod does not work (at least not portably) onTom Lane2001-10-03
| | | | | | -infinity and +infinity. Put TIMESTAMP_NOT_FINITE guard into the routine, instead of forgetting it at some call sites. Fixes regression test failures here.
* Implement precision support for timestamp and time, both with and withoutThomas G. Lockhart2001-10-03
| | | | | | | | | | | | time zones. SQL99 spec requires a default of zero (round to seconds) which is set in gram.y as typmod is set in the parse tree. We *could* change to a default of either 6 (for internal compatibility with previous versions) or 2 (for external compatibility with previous versions). Evaluate entries in pg_proc wrt the iscachable attribute for timestamp and other date/time types. Try to recognize cases where side effects like the current time zone setting may have an effect on results to decide whether something is cachable or not.
* Add CREATE OR REPLACE FUNCTION syntax to allow replacing a functionTom Lane2001-10-02
| | | | | definition without changing the function's OID, thereby not breaking rules, views, triggers, etc that depend on it. From Gavin Sherry.
* Extend pg_get_indexdef() to know about index predicates. Also, tweakTom Lane2001-10-01
| | | | | | | | it to suppress index opclass output for opclasses that are the default for their datatype; only non-default opclasses are shown explicitly. This is expected to improve portability of the CREATE INDEX command across future versions of Postgres --- we've changed index opclasses too often in the past to think we won't do so again.
* Another round of cleanups for dynahash.c (maybe it's finally clean ofTom Lane2001-10-01
| | | | | | | | | portability issues). Caller-visible data structures are now allocated on MAXALIGN boundaries, allowing safe use of datatypes wider than 'long'. Rejigger hash_create API so that caller specifies size of key and total size of entry, not size of key and size of rest of entry. This simplifies life considerably since each number is just a sizeof(), and padding issues etc. are taken care of automatically.
* Remove C++ style comment. Some compilers won't accept it.Tatsuo Ishii2001-10-01
|
* Clean up encode/decode functions a little bit.Tom Lane2001-09-30
|
* pg_stat_get_backend_idset should reset fmgr_info->fn_extra at end ofTom Lane2001-09-30
| | | | execution, so that it restarts correctly if query tree is used again.
* Cope with the likelihood that setlocale and localeconv will returnTom Lane2001-09-29
| | | | | | pointers to data that will be changed by any later call to setlocale. Must copy what they return to be sure we get the right answer. Karel Zak, further tweaks by Tom Lane.
* Measure the current transaction time to milliseconds.Thomas G. Lockhart2001-09-28
| | | | | | | | | | | | | | Define a new function, GetCurrentTransactionStartTimeUsec() to get the time to this precision. Allow now() and timestamp 'now' to use this higher precision result so we now have fractional seconds in this "constant". Add timestamp without time zone type. Move previous timestamp type to timestamp with time zone. Accept another ISO variant for date/time values: yyyy-mm-ddThh:mm:ss (note the "T" separating the day from hours information). Remove 'current' from date/time types; convert to 'now' in input. Separate time and timetz regression tests. Separate timestamp and timestamptz regression test.
* Make lpad/rpad/translate multibyte aware. Also add Copright notice etc.Tatsuo Ishii2001-09-23
|
* Make trim/ltrim/rtrim/btrim multibyte awareTatsuo Ishii2001-09-22
| | | | (previous commit was missing commit messages)
* *** empty log message ***Tatsuo Ishii2001-09-22
|
* Fix type_maximum_size() to give the right answer in MULTIBYTE cases.Tom Lane2001-09-21
| | | | Avoid use of prototype-less function pointers in MB code.
* Suppress compiler warning.Tom Lane2001-09-17
|
* > Here's a revised patch. Changes:Bruce Momjian2001-09-14
| | | | | | | | | | | | | | | | | | | | | | | | > > 1. Now outputs '\\' instead of '\134' when using encode(bytea, 'escape') > Note that I ended up leaving \0 as \000 so that there are no ambiguities > when decoding something like, for example, \0123. > > 2. Fixed bug in byteain which allowed input values which were not valid > octals (e.g. \789), to be parsed as if they were octals. > > Joe > Here's rev 2 of the bytea string support patch. Changes: 1. Added missing declaration for MatchBytea function 2. Added PQescapeBytea to fe-exec.c 3. Applies cleanly on cvs tip from this afternoon I'm hoping that someone can review/approve/apply this before beta starts, so I guess I'd vote (not that it counts for much) to delay beta a few days :-) Joe Conway
* It is not fixed and I doubt that it is working fine in current CVS. TheBruce Momjian2001-09-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bugfix is in the attached patch. Please apply it. Thanks. Output must be: test=# SELECT to_char(485, 'RN'); to_char ----------------- CDLXXXV (1 row) test=# SELECT to_char(485, 'FMRN'); to_char --------- CDLXXXV (1 row) test=# SELECT to_char(1000, 'RN'); to_char ----------------- M (1 row) test=# SELECT to_char(7.2, '"Welcome to"9.9 "release! :-)"'); to_char ----------------------------- Welcome to 7.2 release! :-) (1 row) Karel Zak
* Implement following item in TODO:Tatsuo Ishii2001-09-11
| | | | * Reject character sequences those are not valid in their charset
* Apply 7.1.3 changes to the current tree also.Hiroshi Inoue2001-09-08
|
* Clean up some confusion about where and how to set whereToSendOutput.Tom Lane2001-09-08
| | | | | | | | We will no longer try to send elog messages to the client before we have initialized backend libpq (oops); however, reporting bogus commandline switches via elog does work now (not irrelevant, because of PGOPTIONS). Fix problem with inappropriate sending of checkpoint-process messages to stderr.
* Revise overflow test in int84() to avoid codegen bug in some olderTom Lane2001-09-07
| | | | | versions of gcc. We don't really need to explicitly test the limits anyway, just reverse-convert and see if we get the same answer.