summaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/bool.c
AgeCommit message (Collapse)Author
2014-04-13Provide moving-aggregate support for boolean aggregates.Tom Lane
David Rowley and Florian Pflug, reviewed by Dean Rasheed
2014-01-07Update copyright for 2014Bruce Momjian
Update all files in head, and files COPYRIGHT and legal.sgml in all back branches.
2013-01-01Update copyrights for 2013Bruce Momjian
Fully update git head, and update back branches in ./COPYRIGHT and legal.sgml files.
2012-01-01Update copyright notices for year 2012.Bruce Momjian
2011-01-01Stamp copyrights for year 2011.Bruce Momjian
2010-09-20Remove cvs keywords from all files.Magnus Hagander
2010-01-02Update copyright for the year 2010.Bruce Momjian
2009-06-118.4 pgindent run, with new combined Linux/FreeBSD/MinGW typedef listBruce Momjian
provided by Andrew.
2009-03-09In parse_bool_with_len, avoid crash when no result pointer is passed. ProbablyPeter Eisentraut
an unlikely call mode, but better be safe.
2009-03-09Accept 'on' and 'off' as input for boolean data type, unifying the syntaxPeter Eisentraut
that the data type and GUC accepts. ITAGAKI Takahiro
2009-01-01Update copyright for 2009.Bruce Momjian
2008-10-05Remove obsolete internal functions istrue, isfalse, isnottrue, isnotfalse,Peter Eisentraut
nullvalue, nonvalue. A long time ago, these were used to implement the SQL constructs IS TRUE, etc.
2008-03-25Simplify and standardize conversions between TEXT datums and ordinary CTom Lane
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
2008-01-01Update copyrights in source tree to 2008.Bruce Momjian
2007-11-15pgindent run for 8.3.Bruce Momjian
2007-06-05Downgrade implicit casts to text to be assignment-only, except for the onesTom Lane
from the other string-category types; this eliminates a lot of surprising interpretations that the parser could formerly make when there was no directly applicable operator. Create a general mechanism that supports casts to and from the standard string types (text,varchar,bpchar) for *every* datatype, by invoking the datatype's I/O functions. These new casts are assignment-only in the to-string direction, explicit-only in the other, and therefore should create no surprising behavior. Remove a bunch of thereby-obsoleted datatype-specific casting functions. The "general mechanism" is a new expression node type CoerceViaIO that can actually convert between *any* two datatypes if their external text representations are compatible. This is more general than needed for the immediate feature, but might be useful in plpgsql or other places in future. This commit does nothing about the issue that applying the concatenation operator || to non-text types will now fail, often with strange error messages due to misinterpreting the operator as array concatenation. Since it often (not always) worked before, we should either make it succeed or at least give a more user-friendly error; but details are still under debate. Peter Eisentraut and Tom Lane
2007-06-01Allow leading and trailing whitespace in the input to the booleanNeil Conway
type. Also, add explicit casts between boolean and text/varchar. Both of these changes are for conformance with SQL:2003. Update the regression tests, bump the catversion.
2007-01-05Update CVS HEAD for 2007 copyright. Back branches are typically notBruce Momjian
back-stamped for this.
2006-03-05Update copyright for 2006. Update scripts.Bruce Momjian
2004-12-31Tag appropriate files for rc3PostgreSQL Daemon
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 ...
2004-08-29Pgindent run for 8.0.Bruce Momjian
2004-08-29Update copyright to 2004.Bruce Momjian
2004-05-26The added aggregates are:Bruce Momjian
(1) boolean-and and boolean-or aggregates named bool_and and bool_or. they (SHOULD;-) correspond to standard sql every and some/any aggregates. they do not have the right name as there is a problem with the standard and the parser for some/any. Tom also think that the standard name is misleading because NULL are ignored. Also add 'every' aggregate. (2) bitwise integer aggregates named bit_and and bit_or for int2, int4, int8 and bit types. They are not standard, but I find them useful. I needed them once. The patches adds: - 2 new very short strict functions for boolean aggregates in src/backed/utils/adt/bool.c, src/include/utils/builtins.h and src/include/catalog/pg_proc.h - the new aggregates declared in src/include/catalog/pg_proc.h and src/include/catalog/pg_aggregate.h - some documentation and validation about these new aggregates. Fabien COELHO
2004-05-07Solve the 'Turkish problem' with undesirable locale behavior for caseTom Lane
conversion of basic ASCII letters. Remove all uses of strcasecmp and strncasecmp in favor of new functions pg_strcasecmp and pg_strncasecmp; remove most but not all direct uses of toupper and tolower in favor of pg_toupper and pg_tolower. These functions use the same notions of case folding already developed for identifier case conversion. I left the straight locale-based folding in place for situations where we are just manipulating user data and not trying to match it to built-in strings --- for example, the SQL upper() function is still locale dependent. Perhaps this will prove not to be what's wanted, but at the moment we can initdb and pass regression tests in Turkish locale.
2003-11-29$Header: -> $PostgreSQL Changes ...PostgreSQL Daemon
2003-09-25Message editing: remove gratuitous variations in message wording, standardizePeter Eisentraut
terms, add some clarifications, fix some untranslatable attempts at dynamic message building.
2003-08-04Update copyrights to 2003.Bruce Momjian
2003-07-27Error message editing in utils/adt. Again thanks to Joe Conway for doingTom Lane
the bulk of the heavy lifting ...
2003-05-12Add binary I/O routines for a bunch more datatypes. Still a few to go,Tom Lane
but that was enough tedium for one day. Along the way, move the few support routines for types xid and cid into a more logical place.
2002-06-20Update copyright to 2002.Bruce Momjian
2001-03-22pgindent run. Make it all clean.Bruce Momjian
2001-01-24Change Copyright from PostgreSQL, Inc to PostgreSQL Global Development Group.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-02-10Add btree indexing of boolean valuesBruce Momjian
Don Baccus
2000-01-26Add:Bruce Momjian
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc to all files copyright Regents of Berkeley. Man, that's a lot of files.
1999-07-17 Move some system includes into c.h, and remove duplicates.Bruce Momjian
1999-07-16Update #include cleanupsBruce Momjian
1999-07-15Clean up #include in /include directory. Add scripts for checking includes.Bruce Momjian
1999-07-14Cleanup of /include #include's, for 6.6 only.Bruce Momjian
1999-02-13Change my-function-name-- to my_function_name, and optimizer renames.Bruce Momjian
1998-09-01Renaming cleanup, no pgindent yet.Bruce Momjian
1998-02-26pgindent run before 6.3 release, with Thomas' requested changes.Bruce Momjian
1998-01-05Change some ABORTS to ERROR. Add line number when COPY Failure.Bruce Momjian
1998-01-05Change elog(WARN) to elog(ERROR) and elog(ABORT).Bruce Momjian
1997-11-07Change phrasing of input error message.Thomas G. Lockhart
Add istrue() and isfalse() routines to implement SQL3 IS TRUE and IS FALSE.
1997-10-30Add routines istrue() and isfalse() to directly evaluate boolean type.Thomas G. Lockhart
1997-10-25Check explicitly for valid input strings for both TRUE and FALSE.Thomas G. Lockhart
Allow true/false, yes/no, 1/0. Throw elog warning if anything else. Allow shorter strings, so "t", "tr", "tru" and "true" match "true". Old behavior accepted anything starting with "t" as TRUE, everything else as FALSE.
1997-10-17Accept additional values for TRUE: y, Y, 1.Thomas G. Lockhart
Leave all other input values to return FALSE. In next version, do more checking for valid inputs for both TRUE and FALSE.
1997-10-09Allow 't', 'T', and even/odd ASCII characters to denote true/falseThomas G. Lockhart
rather than just 't' and 'T'. This allows yes/no and 1/0 to be interpreted as one might expect. Clean up function declarations to use bool as the type for arguments and return values.
1997-09-08Another PGINDENT run that changes variable indenting and case label ↵Bruce Momjian
indenting. Also static variable indenting.