aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/oracle_compat.c
Commit message (Collapse)AuthorAge
* Update copyright for 2019Bruce Momjian2019-01-02
| | | | Backpatch-through: certain files through 9.4
* Fix a boatload of typos in C comments.Tom Lane2018-04-01
| | | | | | Justin Pryzby Discussion: https://postgr.es/m/20180331105640.GK28454@telsasoft.com
* Update copyright for 2018Bruce Momjian2018-01-02
| | | | Backpatch-through: certain files through 9.3
* Use new overflow aware integer operations.Andres Freund2017-12-12
| | | | | | | | | | | | | | | | | A previous commit added inline functions that provide fast(er) and correct overflow checks for signed integer math. Use them in a significant portion of backend code. There's more to touch in both backend and frontend code, but these were the easily identifiable cases. The old overflow checks are noticeable in integer heavy workloads. A secondary benefit is that getting rid of overflow checks that rely on signed integer overflow wrapping around, will allow us to get rid of -fwrapv in the future. Which in turn slows down other code. Author: Andres Freund Discussion: https://postgr.es/m/20171024103954.ztmatprlglz3rwke@alap3.anarazel.de
* Update copyright via script for 2017Bruce Momjian2017-01-03
|
* Update copyright for 2016Bruce Momjian2016-01-02
| | | | Backpatch certain files through 9.1
* Remove spurious semicolons.Heikki Linnakangas2015-03-31
| | | | Petr Jelinek
* Update copyright for 2015Bruce Momjian2015-01-06
| | | | Backpatch certain files through 9.0
* Make sure chr(int) can't create invalid UTF8 sequences.Tom Lane2014-05-16
| | | | | | | | | | | | | | | | | | Several years ago we changed chr(int) so that if the database encoding is UTF8, it would interpret its argument as a Unicode code point and expand it into the appropriate multibyte sequence. However, we weren't sufficiently careful about checking validity of the input. According to RFC3629, UTF8 disallows code points above U+10FFFF (note that the predecessor standard RFC2279 was more liberal). Also, both versions of the UTF8 spec agree that Unicode surrogate-pair codes should never appear in UTF8. Because our encoding validity checks follow RFC3629, our failure to enforce these restrictions in chr() means it could be used to produce text strings that will be rejected when the database is dumped and reloaded. To ensure consistency with the input functions, let's actually apply pg_utf8_islegal() to the proposed output of chr(). Per discussion, this seems like too much of a behavioral change to back-patch, but it's not too late to squeeze it into 9.4.
* Update copyright for 2014Bruce Momjian2014-01-07
| | | | | Update all files in head, and files COPYRIGHT and legal.sgml in all back branches.
* Update copyrights for 2013Bruce Momjian2013-01-01
| | | | | Fully update git head, and update back branches in ./COPYRIGHT and legal.sgml files.
* Update copyright notices for year 2012.Bruce Momjian2012-01-01
|
* Per-column collation supportPeter Eisentraut2011-02-08
| | | | | | | | This adds collation support for columns and domains, a COLLATE clause to override it per expression, and B-tree index support. Peter Eisentraut reviewed by Pavel Stehule, Itagaki Takahiro, Robert Haas, Noah Misch
* Stamp copyrights for year 2011.Bruce Momjian2011-01-01
|
* Remove cvs keywords from all files.Magnus Hagander2010-09-20
|
* Update copyright for the year 2010.Bruce Momjian2010-01-02
|
* 8.4 pgindent run, with new combined Linux/FreeBSD/MinGW typedef listBruce Momjian2009-06-11
| | | | provided by Andrew.
* Update copyright for 2009.Bruce Momjian2009-01-01
|
* Const-ify the arguments of str_tolower() and friends to suppress compileTom Lane2008-07-12
| | | | | | | | warnings. Clean up various unneeded cruft that was left behind after creating those routines. Introduce some convenience functions str_tolower_z etc to eliminate tedious and error-prone double arguments in formatting.c. (Currently there seems no need to export the latter, but maybe reconsider this later.)
* Merge duplicate upper/lower/initcap() routines in oracle_compat.c andBruce Momjian2008-06-23
| | | | | formatting.c to use common code; remove duplicate functions and support routines that are no longer needed.
* Move USE_WIDE_UPPER_LOWER define to c.h, and remove TS_USE_WIDE and useBruce Momjian2008-06-17
| | | | USE_WIDE_UPPER_LOWER instead.
* Make to_char()'s localized month/day names depend on LC_TIME, not LC_MESSAGES.Tom Lane2008-05-19
| | | | Euler Taveira de Oliveira
* Simplify and standardize conversions between TEXT datums and ordinary CTom Lane2008-03-25
| | | | | | | | | | | | | | | | | | | | strings. This patch introduces four support functions cstring_to_text, cstring_to_text_with_len, text_to_cstring, and text_to_cstring_buffer, and two macros CStringGetTextDatum and TextDatumGetCString. A number of existing macros that provided variants on these themes were removed. Most of the places that need to make such conversions now require just one function or macro call, in place of the multiple notational layers that used to be needed. There are no longer any direct calls of textout or textin, and we got most of the places that were using handmade conversions via memcpy (there may be a few still lurking, though). This commit doesn't make any serious effort to eliminate transient memory leaks caused by detoasting toasted text objects before they reach text_to_cstring. We changed PG_GETARG_TEXT_P to PG_GETARG_TEXT_PP in a few places where it was easy, but much more could be done. Brendan Jurd and Tom Lane
* Update copyrights in source tree to 2008.Bruce Momjian2008-01-01
|
* Fix thinko in encoding check for chr()Andrew Dunstan2007-12-18
|
* Slightly more paranoia and slightly better comments for use ofTom Lane2007-11-24
| | | | Windows-specific MultiByteToWideChar/WideCharToMultiByte calls.
* pgindent run for 8.3.Bruce Momjian2007-11-15
|
* Fix bogus calculation of potential output string length in translate().Tom Lane2007-09-22
|
* Fix regex, LIKE, and some other second-rank text-manipulation functionsTom Lane2007-09-21
| | | | | | to not cause needless copying of text datums that have 1-byte headers. Greg Stark, in response to performance gripe from Guillaume Smet and ITAGAKI Takahiro.
* Close previously open holes for invalidly encoded data to enter theAndrew Dunstan2007-09-18
| | | | | | | | | | | | | | | | | | | | | database via builtin functions, as recently discussed on -hackers. chr() now returns a character in the database encoding. For UTF8 encoded databases the argument is treated as a Unicode code point. For other multi-byte encodings the argument must designate a strict ascii character, or an error is raised, as is also the case if the argument is 0. ascii() is adjusted so that it remains the inverse of chr(). The two argument form of convert() is gone, and the three argument form now takes a bytea first argument and returns a bytea. To cover this loss three new functions are introduced: . convert_from(bytea, name) returns text - converts the first argument from the named encoding to the database encoding . convert_to(text, name) returns bytea - converts the first argument from the database encoding to the named encoding . length(bytea, name) returns int - gives the length of the first argument in characters in the named encoding
* Replace direct assignments to VARATT_SIZEP(x) with SET_VARSIZE(x, len).Tom Lane2007-02-27
| | | | | | | | | | | Get rid of VARATT_SIZE and VARATT_DATA, which were simply redundant with VARSIZE and VARDATA, and as a consequence almost no code was using the longer names. Rename the length fields of struct varlena and various derived structures to catch anyplace that was accessing them directly; and clean up various places so caught. In itself this patch doesn't change any behavior at all, but it is necessary infrastructure if we hope to play any games with the representation of varlena headers. Greg Stark and Tom Lane
* Fix bug when localized to_char() day or month names were incorectlyBruce Momjian2007-02-08
| | | | | | trnasformed to lower or upper string. Pavel Stehule
* Update CVS HEAD for 2007 copyright. Back branches are typically notBruce Momjian2007-01-05
| | | | back-stamped for this.
* Fix another passel of include-file breakage. Kris Jurka, Tom LaneTom Lane2006-07-14
|
* Remove 576 references of include files that were not needed.Bruce Momjian2006-07-14
|
* Update copyright for 2006. Update scripts.Bruce Momjian2006-03-05
|
* Remove a gratuitous string difference (does not affect translations).Peter Eisentraut2005-11-04
|
* Message correctionsPeter Eisentraut2005-10-29
|
* Standard pgindent run for 8.1.Bruce Momjian2005-10-15
|
* Add small hack to support use of Unicode-based locales on WIN32. ThisTom Lane2005-08-24
| | | | | is not adequately tested yet, but let's get it into beta1 so it can be tested. Magnus Hagander and Tom Lane.
* Add comment on C locale test for upper/lower/initcap().Bruce Momjian2005-05-07
|
* Add missing include for new lc_ctype_is_c() function.Bruce Momjian2005-03-16
| | | | Per Neil.
* Prevent locale-aware handling of upper, lower, and initcap when theBruce Momjian2005-03-16
| | | | | | | locale is C. Backpatch to 8.0.X because some operating systems were throwing errors for such operations, rather than ignoring the locale when it was C.
* Tag appropriate files for rc3PostgreSQL Daemon2004-12-31
| | | | | | | | Also performed an initial run through of upgrading our Copyright date to extend to 2005 ... first run here was very simple ... change everything where: grep 1996-2004 && the word 'Copyright' ... scanned through the generated list with 'less' first, and after, to make sure that I only picked up the right entries ...
* Add a HINT about the likely reason for 'invalid multibyte character for ↵Tom Lane2004-10-19
| | | | locale' failure.
* Pgindent run for 8.0.Bruce Momjian2004-08-29
|
* Update copyright to 2004.Bruce Momjian2004-08-29
|
* Dept of second thoughts: don't use the new wide-character upper/lowerTom Lane2004-06-06
| | | | | code if we are running in a single-byte encoding. No point in the extra overhead in that case.
* Add <limits.h>, per Magnus.Tom Lane2004-05-26
|
* Use wide-character library routines, if available, for upper/lower/initcapTom Lane2004-05-22
| | | | | | | | | | functions. This allows these functions to work correctly with Unicode and other multibyte encodings. Per prior discussion. Also, revert my earlier change to move installation path mashing from Makefile.global to configure. Turns out not to work well because configure script is working with unexpanded variables, and so fails to match in cases where it should match.