Re: [BUGS] BUG #9652: inet types don't support min/max

Поиск
Список
Период
Сортировка
От Keith Fiske
Тема Re: [BUGS] BUG #9652: inet types don't support min/max
Дата
Msg-id CAG1_KcACFumz6HOWS_EPNTCcd5dmCJ1xEmp0iLeS9QRkxC7iyQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [BUGS] BUG #9652: inet types don't support min/max  (Haribabu Kommi <kommi.haribabu@gmail.com>)
Список pgsql-hackers



On Tue, Jun 3, 2014 at 8:37 PM, Haribabu Kommi <kommi.haribabu@gmail.com> wrote:
On Wed, Jun 4, 2014 at 5:46 AM, Keith Fiske <keith@omniti.com> wrote:
>
> Andres's changes on June 3rd to
> https://github.com/postgres/postgres/commits/master/src/test/regress/expected/create_function_3.out
> are causing patch v2 to fail for that regression test file.
>
> postgres $ patch -p1 -i ../inet_agg_v2.patch
> patching file src/backend/utils/adt/network.c
> patching file src/include/catalog/pg_aggregate.h
> patching file src/include/catalog/pg_proc.h
> patching file src/include/utils/builtins.h
> patching file src/test/regress/expected/create_function_3.out
> Hunk #1 FAILED at 153.
> 1 out of 1 hunk FAILED -- saving rejects to file
> src/test/regress/expected/create_function_3.out.rej
> patching file src/test/regress/expected/inet.out
> patching file src/test/regress/sql/inet.sql
>
> Otherwise it applies without any issues to the latest HEAD. I built and
> started a new instance, and I was able to test at least the basic min/max
> functionality
>
> keith=# create table test_inet (id serial, ipaddress inet);
> CREATE TABLE
> Time: 25.546 ms
> keith=# insert into test_inet (ipaddress) values ('192.168.1.1');
> INSERT 0 1
> Time: 3.143 ms
> keith=# insert into test_inet (ipaddress) values ('192.168.1.2');
> INSERT 0 1
> Time: 2.932 ms
> keith=# insert into test_inet (ipaddress) values ('127.0.0.1');
> INSERT 0 1
> Time: 1.786 ms
> keith=# select min(ipaddress) from test_inet;
>     min
> -----------
>  127.0.0.1
> (1 row)
>
> Time: 3.371 ms
> keith=# select max(ipaddress) from test_inet;
>      max
> -------------
>  192.168.1.2
> (1 row)
>
> Time: 1.104 ms

Thanks for the test. Patch is re-based to the latest head.

Regards,
Hari Babu
Fujitsu Australia


Applying patch against latest HEAD (654e8e444749f053c3bf3fd543d10deb6aa6dd09) with no issues

$ patch -p1 -i ../inet_agg_v3.patch
patching file src/backend/utils/adt/network.c
patching file src/include/catalog/pg_aggregate.h
patching file src/include/catalog/pg_proc.h
patching file src/include/utils/builtins.h
patching file src/test/regress/expected/create_function_3.out
patching file src/test/regress/expected/inet.out
patching file src/test/regress/sql/inet.sql

Ran same min/max test as before and worked without issues.

--
Keith Fiske
Database Administrator
OmniTI Computer Consulting, Inc.
http://www.keithf4.com

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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: Could not open file pg_multixact/offsets/ ERROR on 9.3.4
Следующее
От: Pavel Stehule
Дата:
Сообщение: Re: psql: show only failed queries