[GENERAL] Bug? Netmask of CIDR as TEXT has trailing masklen

2016-12-23 Thread nomad
The following displays as I would expect: mark=# select netmask('1.1.1.0/24'); netmask --- 255.255.255.0 (1 row) However the following does not look right: mark=# select netmask('1.1.1.0/24')::text; netmask -- 2

Re: [GENERAL] Bug? Netmask of CIDR as TEXT has trailing masklen

2016-12-23 Thread nomad
On Fri Dec 23, 2016 at 10:15:21AM -0500, Tom Lane wrote: > > Yes, it should be: that is the same as "text(netmask('1.1.1.0/24'))", > and the table of network functions specifically describes text(inet) > as "extract IP address and netmask length as text". If you only want > the IP address, use hos