aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/network.c
Commit message (Collapse)AuthorAge
...
* Standard pgindent run for 8.1.Bruce Momjian2005-10-15
|
* Do proper testing of CIDR bits against network mask, e.g. don't allow:Bruce Momjian2004-10-08
| | | | | | | | | | test=# select '204.248.199.1/31'::cidr; Previous releases erroneously accepted such addresses. WARN IN RELEASE NOTES Kevin Brintnall
* Pgindent run for 8.0.Bruce Momjian2004-08-29
|
* Give inet/cidr datatypes their own hash function that ignores the inet vsTom Lane2004-06-13
| | | | | | | cidr type bit, the same as network_eq does. This is needed for hash joins and hash aggregation to work correctly on these types. Per bug report from Michael Fuhr, 2004-04-13. Also, improve hash function for int8 as suggested by Greg Stark.
* Code review for recently-added network functions. Get it to work whenTom Lane2004-06-13
| | | | log_hostname is enabled, clean up documentation.
* *) inet_(client|server)_(addr|port)() and necessary documentation forBruce Momjian2004-05-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the four functions. > Also, please justify the temp-related changes. I was not aware that we > had any breakage there. patch-tmp-schema.txt contains the following bits: *) Changes pg_namespace_aclmask() so that the superuser is always able to create objects in the temp namespace. *) Changes pg_namespace_aclmask() so that if this is a temp namespace, objects are only allowed to be created in the temp namespace if the user has TEMP privs on the database. This encompasses all object creation, not just TEMP tables. *) InitTempTableNamespace() checks to see if the current user, not the session user, has access to create a temp namespace. The first two changes are necessary to support the third change. Now it's possible to revoke all temp table privs from non-super users and limiting all creation of temp tables/schemas via a function that's executed with elevated privs (security definer). Before this change, it was not possible to have a setuid function to create a temp table/schema if the session user had no TEMP privs. patch-area-path.txt contains: *) Can now determine the area of a closed path. patch-dfmgr.txt contains: *) Small tweak to add the library path that's being expanded. I was using $lib/foo.so and couldn't easily figure out what the error message, "invalid macro name in dynamic library path" meant without looking through the source code. With the path in there, at least I know where to start looking in my config file. Sean Chittenden
* netmask() and hostmask() functions should return maximum-length masklen,Tom Lane2003-12-01
| | | | per gripe from Joe Sunday.
* $Header: -> $PostgreSQL Changes ...PostgreSQL Daemon2003-11-29
|
* More message editing, some suggested by Alvaro HerreraPeter Eisentraut2003-09-29
|
* Message editing: remove gratuitous variations in message wording, standardizePeter Eisentraut2003-09-25
| | | | | terms, add some clarifications, fix some untranslatable attempts at dynamic message building.
* pgindent run.Bruce Momjian2003-08-04
|
* inet_recv() wasn't IPv6-ready.Tom Lane2003-08-01
|
* Error message editing in utils/adt. Again thanks to Joe Conway for doingTom Lane2003-07-27
| | | | the bulk of the heavy lifting ...
* Add ipv6 address parsing support to 'inet' and 'cidr' data types.Bruce Momjian2003-06-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Regression tests for IPv6 operations added. Documentation updated to document IPv6 bits. Stop treating IPv4 as an "unsigned int" and IPv6 as an array of characters. Instead, always use the array of characters so we can have one function fits all. This makes bitncmp(), addressOK(), and several other functions "just work" on both address families. add family() function which returns integer 4 or 6 for IPv4 or IPv6. (See examples below) Note that to add this new function you will need to dump/initdb/reload or find the correct magic to add the function to the postgresql function catalogs. IPv4 addresses always sort before IPv6. On disk we use AF_INET for IPv4, and AF_INET+1 for IPv6 addresses. This prevents the need for a dump and reload, but lets IPv6 parsing work on machines without AF_INET6. To select all IPv4 addresses from a table: select * from foo where family(addr) = 4 ... Order by and other bits should all work. Michael Graff
* More binary I/O routines.Tom Lane2003-05-13
|
* Fix compile warning.Tom Lane2003-03-21
|
* Add hostmask() function:Bruce Momjian2003-03-21
| | | | | | | | | | + <entry><function>hostmask</function>(<type>inet</type>)</entry> + <entry><type>inet</type></entry> + <entry>construct hostmask for network</entry> + <entry><literal>hostmask('192.168.23.20/30')</literal></entry> + <entry><literal>0.0.0.3</literal></entry> Greg Wickham
* Add new palloc0 call as merge of palloc and MemSet(0).Bruce Momjian2002-11-13
|
* Back out use of palloc0 in place if palloc/MemSet. Seems constant lenBruce Momjian2002-11-11
| | | | to MemSet is a performance boost.
* Merge palloc()/MemSet(0) calls into a single palloc0() call.Bruce Momjian2002-11-10
|
* Remove sys/types.h in files that include postgres.h, and hence c.h,Bruce Momjian2002-09-02
| | | | because c.h has sys/types.h.
* pgindent run on all C files. Java run to follow. initdb/regressionBruce Momjian2001-10-25
| | | | tests pass.
* Fix confusion over static-ness of a subroutine.Tom Lane2001-08-27
|
* Make inet/cidr << and <<= operators indexable. From Alex Pilosov ↵Tom Lane2001-06-17
| | | | <alex@pilosoft.com>.
* Attached is a patch adding following functions:Bruce Momjian2001-06-13
| | | | | | | | | inet(text), cidr(text): convert a text value into inet/cidr set_masklen(inet): set masklen on the inet value Patch also contains regression checks for these functions. Alex Pilosov
* Teach convert_to_scalar about datatypes timetz, inet, cidr, macaddr.Tom Lane2001-06-09
|
* pgindent run. Make it all clean.Bruce Momjian2001-03-22
|
* Change default output formatting for CIDR to be unabbreviated, perTom Lane2000-12-22
| | | | | | recommendation from Paul Vixie. Add a new abbrev() function to produce abbreviated format as text. No forced initdb, but new function is not available unless you do an initdb or add the pg_proc row manually.
* Fix some portability bugs I'd introduced into inet/cidr code ---Tom Lane2000-11-25
| | | | shifting by the word width is not defined by ANSI C...
* Adjust INET/CIDR display conventions and reimplement some INET/CIDRTom Lane2000-11-10
| | | | | | | functions, per recent discussions on pghackers. For now, I have called the verbose-display formatting function text(), but will reconsider if enough people object. initdb forced.
* Disallow bits beyond the mask length for CIDR values, per discussionTom Lane2000-10-27
| | | | | | | on pghackers. Arrange for the sort ordering of general INET values to be network part as major sort key, host part as minor sort key. I did not force an initdb for this change, but anyone who's running indexes on general INET values may need to recreate those indexes.
* Convert inet-related functions to new fmgr style. I have also taken itTom Lane2000-08-03
| | | | | | | | 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.
* Functions on 'text' type updated to new fmgr style. 'text' isTom Lane2000-07-06
| | | | now TOAST-able.
* TOASTJan Wieck2000-07-03
| | | | | | | | WARNING: This is actually broken - we have self-deadlocks due to concurrent changes in buffer management. Vadim and me are working on it. Jan
* Ye-old pgindent run. Same 4-space tabs.Bruce Momjian2000-04-12
|
* Reversed out inet patch.Bruce Momjian2000-03-08
|
* Sorting for the inet data type randomly returns the wrong resultBruce Momjian2000-03-07
| | | | | | | | | | | | | | | | | | | | | | | | | | when you have networks with the same prefix, but different netmasks. This is due to the fact that occassionally there is random (uninitialized?) data in the extra bits past the point where the netmask cares about them. ie (real data from a real live database): 10.0/10 == 00001010.00100000.00100000.00011000 10.0/11 == 00001010.00000000.00000000.00000000 ^ Bad data, normally never seen The v4bitncmp() function was only taking one bit length argument so it would determine that the networks were different, even though they really aren't (and the netmask test wouldn't be used). This ONLY happens if the tuple with the longer bit length is used as the ip_bits() for the v4bitncmp call AND there happens to be junk data in place in the shorter tuple. Odd and random, but I saw it happen a couple times so... Ryan Mooney
* Oops, commited a test version of this file by accident. Revert.Tom Lane2000-02-21
|
* Change parse-time representation of float literals (which include oversizeTom Lane2000-02-21
| | | | | | | | integers) to be strings instead of 'double'. We convert from string form to internal representation only after type resolution has determined the correct type for the constant. This eliminates loss-of-precision worries and gets rid of the change in behavior seen at 17 digits with the previous kluge.
* Fix for netmask('x.x.x.x/0') is 255.255.255.255 instead of 0.0.0.0Bruce Momjian1999-09-23
| | | | | | This is because (-1) << 32 is -1 (Only intel arc. has been checked) Oleg Sharoiko
* Move some system includes into c.h, and remove duplicates.Bruce Momjian1999-07-17
|
* Change #include's to use <> and "" as appropriate.Bruce Momjian1999-07-15
|
* Remove unused #includes in *.c files.Bruce Momjian1999-07-15
|
* Clean up #include in /include directory. Add scripts for checking includes.Bruce Momjian1999-07-15
|
* Cleanup of /include #include's, for 6.6 only.Bruce Momjian1999-07-14
|
* The INET and CIDR types mistakenly compared 198.68.123.0/24 andBruce Momjian1999-06-02
| | | | | | 198.68.123.0/27 the same when indexing them. D'Arcy
* pgindent run over code.Bruce Momjian1999-05-25
|
* Fix boolean assignment of return values to use "FALSE" rather than theThomas G. Lockhart1999-04-15
| | | | | mis-copied "NULL", which happens to have the same binary value. Previously, gcc gave non-fatal warnings.
* Cleanup of NULL in inet types.Bruce Momjian1999-03-22
|
* Thank you for the advice. I concluded that current inet code has aBruce Momjian1999-02-24
| | | | | | | | portability problem. Included patches should be applied to both current and 6.4 tree. I have tested on LinuxPPC, FreeBSD and Solaris 2.6. Now the inet regression tests on these platforms are all happy. --- Tatsuo Ishii