Feature request: min/max for macaddr type

Поиск
Список
Период
Сортировка
От Herwin Weststrate
Тема Feature request: min/max for macaddr type
Дата
Msg-id 5f941094-8f6f-8bf3-5e48-3c72106d9ee2@quarantainenet.nl
обсуждение исходный текст
Ответы Re: Feature request: min/max for macaddr type
Список pgsql-general
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



В списке pgsql-general по дате отправления:

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Re: Postgresql upgrade to 9.5.12/10.3 changes pg_dump format forcloning schemas
Следующее
От: Andre Oliveira Freitas
Дата:
Сообщение: Re: Postgresql upgrade to 9.5.12/10.3 changes pg_dump format forcloning schemas