summaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/mac.c
AgeCommit message (Collapse)Author
2014-10-21Allow input format xxxx-xxxx-xxxx for macaddr typePeter Eisentraut
Author: Herwin Weststrate <herwin@quarantainenet.nl> Reviewed-by: Ali Akbar <the.apaan@gmail.com>
2012-06-10Run pgindent on 9.2 source tree in preparation for first 9.3Bruce Momjian
commit-fest.
2012-01-19Add bitwise AND, OR, and NOT operators for macaddr data type.Robert Haas
Brendan Jurd, reviewed by Fujii Masao
2010-09-20Remove cvs keywords from all files.Magnus Hagander
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-02-27Replace direct assignments to VARATT_SIZEP(x) with SET_VARSIZE(x, len).Tom Lane
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
2006-01-11Cosmetic code cleanup: fix a bunch of places that used "return (expr);"Neil Conway
rather than "return expr;" -- the latter style is used in most of the tree. I kept the parentheses when they were necessary or useful because the return expression was complex.
2005-10-15Standard pgindent run for 8.1.Bruce Momjian
2004-08-29Pgindent run for 8.0.Bruce Momjian
2003-11-29$Header: -> $PostgreSQL Changes ...PostgreSQL Daemon
2003-09-29More message editing, some suggested by Alvaro HerreraPeter Eisentraut
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-04pgindent run.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-13More binary I/O routines.Tom Lane
2002-10-13Make macaddr_in reject trailing garbage (except whitespace).Tom Lane
Per gripe from Patrick Welche, 13-Oct-2002.
2002-09-04pgindent run.Bruce Momjian
2002-08-28backend where a statically sized buffer is written to. Most of theseBruce Momjian
should be pretty safe in practice, but it's probably better to be safe than sorry. I was actually looking for cases where NAMEDATALEN is assumed to be 32, but only found one. That's fixed too, as well as a few bits of code cleanup. Neil Conway
2002-06-17Merge ALTER GROUP ADD/DROP rules by creating add_drop action.Bruce Momjian
2002-06-15The macaddr datatype understands most formats of MAC address, except 12Bruce Momjian
hex digits with no separators, eg 00AABBCCDDEE. This is easily remedied with the following patch (against 7.2.1): Mike Wyer
2002-03-09Code review for improved-hashing patch. Fix some portability issuesTom Lane
(char != unsigned char, Datum != uint32); make use of new hash code in dynahash hash tables and hash joins.
2001-08-21Remove special-case treatment of all-zeroes MAC address, per today'sTom Lane
discussion in pgsql-general.
2001-03-22pgindent run. Make it all clean.Bruce Momjian
2000-12-08Repair erroneous use of hashvarlena() for MACADDR, which is not aTom Lane
varlena type. (I did not force initdb, but you won't see the fix unless you do one.) Also, make sure all index support operators and functions are careful not to leak memory for toasted inputs; I had missed some hash and rtree support ops on this point before.
2000-08-23Add functions to convert to and from text, and to truncate to MAC OUI.Thomas G. Lockhart
Remove hardcoded macaddr_manuf(), which had really old, obsolete info. Replace this with some contrib/mac/ code to maniag OUI info from IEEE.
2000-08-03Convert inet-related functions to new fmgr style. I have also taken itTom Lane
on myself to do something about the non-self-consistency of the inet comparison functions. The results are probably still semantically wrong (inet and cidr should have different comparison semantics, I think) but at least the boolean operators now agree with each other and with the sort order of indexes on inet/cidr.
2000-07-06Functions on 'text' type updated to new fmgr style. 'text' isTom Lane
now TOAST-able.
2000-07-03TOASTJan Wieck
WARNING: This is actually broken - we have self-deadlocks due to concurrent changes in buffer management. Vadim and me are working on it. Jan
1999-12-16Ethernet MAC addresses (macaddr type) are not compared correctly forBruce Momjian
equality. The lobits macro is wrong and extracts the wrong set of bits out of the structure. To exhibit the problem: select '000000:000000'::macaddr = '000000:110000'::macaddr ; ?column? -------- t (1 row) Daniel Boyd
1999-07-17 Move some system includes into c.h, and remove duplicates.Bruce Momjian
1999-07-15Change #include's to use <> and "" as appropriate.Bruce Momjian
1999-07-15Remove unused #includes in *.c files.Bruce 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-05-25pgindent run over code.Bruce Momjian
1999-03-22Cleanup of NULL in inet types.Bruce Momjian
1998-10-26Get rid of some minor compiler warnings.Tom Lane
1998-10-08Fix for INET type addition.Bruce Momjian
1998-10-08I agree. I think, though, that the best argument presented in theBruce Momjian
debate was from Paul Vixie, who wanted INET to be the name covering both IPV4 and IPV6. The following kit makes the needed changes: Tom Ivar Helbekkmo
1998-10-04Add includes for prototypes for new IP type.Bruce Momjian
1998-10-04Add prototype include to inet types.Bruce Momjian
1998-10-03Integrate new IP type from Tom Ivar Helbekkmo.Bruce Momjian