Hi, thank for your feedback, and sorry for my too premature answer. Indeed, functions masklen() & netmask() are there an work fine for me (yum-installed MonetDB Oct2014 on Fedora 20). I'm puzzled why it doesn't work with you given a seemingly identical setup. Did you try with a new virgin database, or did you upgrade your database from an earlier MonetDB version? inet "containment" operators (<< & <<=) appear to be not supported by the parser (which interprets the first a left-shift, and does not recognize the latter as valid operator). inequality (< & <=) appear to work fine also for me, while equality (=) gives an error. See details below. Best, Stefan ======== Welcome to mclient, the MonetDB/SQL interactive terminal (Oct2014) Database: MonetDB v11.19.3 (Oct2014), 'demo' Type \q to quit, \? for a list of available commands auto commit mode: on sql>select masklen(inet'192.168.0.0/24'); +----------------------+ | masklen_single_value | +======================+ | 24 | +----------------------+ 1 tuple (0.924ms) sql>select netmask(inet'192.168.0.0/24'); +----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | netmask_single_value | +======================================================================================================================================================================================================================================================================================================================+ | 255.255.255.0 | +----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ 1 tuple (0.831ms) sql>select inet'192.168.0.0/24' << inet'xxx.xxx.xxx.xxx/27'; SELECT: no such binary operator 'left_shift(inet,inet)' sql>select inet'192.168.0.0/24' <<= inet'xxx.xxx.xxx.xxx/27'; syntax error, unexpected '=' in: "select inet'192.168.0.0/24' <<=" sql>select inet'192.168.0.0/24' < inet'xxx.xxx.xxx.xxx/27'; +----------------+ | <_single_value | +================+ | null | +----------------+ 1 tuple (1.9s) sql>select inet'192.168.0.0/24' <= inet'xxx.xxx.xxx.xxx/27'; +-----------------+ | <=_single_value | +=================+ | null | +-----------------+ 1 tuple (0.670ms) sql>select inet'192.168.0.0/24' = inet'xxx.xxx.xxx.xxx/27'; TypeException:user.s6_1[4]:'calc.==' undefined in: _7:any := calc.==(_5:inet, _6:inet) program contains errors sql>select inet'192.168.0.0/24' = inet'192.168.0.0/24'; TypeException:user.s7_1[4]:'calc.==' undefined in: _7:any := calc.==(_5:inet, _6:inet) program contains errors sql>select inet'192.168.0.0/24' <= inet'192.168.0.0/24'; +-----------------+ | <=_single_value | +=================+ | true | +-----------------+ 1 tuple (1.198ms) sql>select inet'192.168.0.0/24' < inet'192.168.0.0/24'; +----------------+ | <_single_value | +================+ | false | +----------------+ 1 tuple (1.104ms) sql>select inet'192.168.0.0/24' < inet'192.168.0.1/24'; +----------------+ | <_single_value | +================+ | true | +----------------+ 1 tuple (0.560ms) sql>select inet'192.168.0.1/24' <= inet'192.168.0.0/24'; +-----------------+ | <=_single_value | +=================+ | false | +-----------------+ 1 tuple (0.441ms) sql> ======== ----- Original Message -----
Hello!
Thanks for your note. I'm a little confused because the functions do seem to be in the source code (monetdb5/modules/atoms/inet.c). Is it just that the functions aren't being included in the build?
One reason I ask is that I'd like to experiment with adding IPv6 support, so it would be useful to know how functions like this get linked in (or in this case, not linked in).
Thanks!
Tim
On 11/13/2014 04:13 PM, Stefan Manegold wrote:
Hi Tim,
I'm afraid the operations and functions that you want to use have not yet been implemented in MonetDB. Sorry!
Please consider filing a feature request via http://bugs.monetdb.org/
Thanks!
Best, Stefan
On November 13, 2014 2:32:27 AM CET, Tim Burress
wrote: Hello,
I'm a relatively new user and have run into a problem which may just be a misunderstanding. I'm using the Oct2014 version, installed on Fedora 20 from the MonetDB rpm repository. When I try to query a database using inet "containment" operators like << or <<= it seems that the operators are not recognized:
sql> select src,dst from raw.ids where src << inet'xxx.xxx.xxx.xxx/27'; SELECT: no such binary operator 'left_shift(inet,inet)'
sql> select src,dst from raw.ids where src <<= inet'xxx.xxx.xxx.xxx/27'; syntax error, unexpected '=' in: "select src,dst from raw.ids where src <<="
Other ordinary binary inet operators seem OK:
sql> select src,dst from raw.ids where src = inet'xxx.xxx.xxx.xxx'; (prints out table) sql> select src,dst from raw.ids where src < dst; (prints out table)
However the documented functions do not seem to be recognized:
sql> select masklen(inet'192.168.0.0/24') SELECT: no such unary operator 'masklen(inet)' sql> select netmask(inet'192.168.0.0/24') SELECT: no such unary operator 'netmask(inet)'
So it seems that support for network address types is only partially available in this release. Is that normal? Do I need to rebuild from source in order to get them?
Thanks!
Tim
_______________________________________________ users-list mailing list users-list@monetdb.org https://www.monetdb.org/mailman/listinfo/users-list
-- | Stefan.Manegold@CWI.nl | DB Architectures (DA) | | www.CWI.nl/~manegold/ | Science Park 123 (L321) | | +31 (0)20 592-4212 | 1098 XG Amsterdam (NL) |
_______________________________________________ users-list mailing list users-list@monetdb.org https://www.monetdb.org/mailman/listinfo/users-list
-- | Stefan.Manegold@CWI.nl | DB Architectures (DA) | | www.CWI.nl/~manegold/ | Science Park 123 (L321) | | +31 (0)20 592-4212 | 1098 XG Amsterdam (NL) |