Search Postgresql Archives

Feature request: min/max for macaddr type

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



My use case: I was writing some tests where I just needed some inets and
macaddrs in a database table with certain properties. I tried to use the
following queries:

INSERT INTO inet_table (inet, ..) VALUES ((SELECT max(inet) + 1 FROM
inet_table), ...);
INSERT INTO macaddr_table (macaddr, ...) VALUES ((SELECT max(macaddr) +
1 FROM macaddr_table), ...);

This works fine for the inet type, but the macaddr failed this. I tried
adding some functions for macaddr_smaller/macaddr_larger to implement
the min/max. The code for it was very trivial, but then I got completely
lost in pg_proc.h/pg_aggregate.h. I fail to find the documentation for
this files as well, is there any reference I could use to finish my work?

-- 
Herwin Weststrate





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux