Re: Is this a Postgres Bug?
От | Xiong He |
---|---|
Тема | Re: Is this a Postgres Bug? |
Дата | |
Msg-id | tencent_43286FFA6A5C2EDA06BC850D@qq.com обсуждение исходный текст |
Ответ на | Is this a Postgres Bug? (Mike Christensen <mike@kitchenpc.com>) |
Список | pgsql-general |
Seems this is not a bug.
Although 32767 doesn't exceed the 2bit int range.
But (32767 + 10) exceed the signed 2bit int range.
If you want to add index for the sum of the 2 columns, why don't you add a new column with a larger range (int32) ?
First off, I've posted this question on StackOverflow in case anyone
wants to answer it:
http://stackoverflow.com/questions/11814132/postgresql-smallint-overflowing-when-creating-index-on-multiple-columns-is-th
The repro can be found here: http://sqlfiddle.com/#!1/734d7/1
I'm happy to log this as a bug, unless someone can explain to me why
this behavior is by design. Thanks!
Mike
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Although 32767 doesn't exceed the 2bit int range.
But (32767 + 10) exceed the signed 2bit int range.
If you want to add index for the sum of the 2 columns, why don't you add a new column with a larger range (int32) ?
------------------ Original ------------------
From: "Mike Christensen"<mike@kitchenpc.com>;
Date: Sun, Aug 5, 2012 01:14 PM
To: "pgsql-general"<pgsql-general@postgresql.org>;
Subject: [GENERAL] Is this a Postgres Bug?
wants to answer it:
http://stackoverflow.com/questions/11814132/postgresql-smallint-overflowing-when-creating-index-on-multiple-columns-is-th
The repro can be found here: http://sqlfiddle.com/#!1/734d7/1
I'm happy to log this as a bug, unless someone can explain to me why
this behavior is by design. Thanks!
Mike
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
В списке pgsql-general по дате отправления: