Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VUN9I-0001lO-Rp for pgsql-bugs@arkaria.postgresql.org; Thu, 10 Oct 2013 20:47:57 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1VUN9H-0003YV-AP for pgsql-bugs@arkaria.postgresql.org; Thu, 10 Oct 2013 20:47:55 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VUCNa-0003LS-9K for pgsql-bugs@postgresql.org; Thu, 10 Oct 2013 09:17:58 +0000 Received: from mail.bitdefender.com ([91.199.104.2]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VUCNT-0006eA-7R for pgsql-bugs@postgresql.org; Thu, 10 Oct 2013 09:17:57 +0000 Received: (qmail 487 invoked from network); 10 Oct 2013 12:17:48 +0300 Received: from 4.bitdefender.com (HELO ?192.168.250.119?) (gciubotaru@bitdefender.com@91.199.104.4) by mail.bitdefender.com with AES256-SHA encrypted SMTP; 10 Oct 2013 12:17:48 +0300 Message-ID: <525670B3.5060007@bitdefender.com> Date: Thu, 10 Oct 2013 12:17:39 +0300 From: Gabriel Ciubotaru User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 MIME-Version: 1.0 To: pgsql-bugs@postgresql.org Subject: Bit String expand bug Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BitDefender-Spam: No (0) X-BitDefender-SpamStamp: Build: [Engines: 2.14.4.17486, Dats: 315745, Stamp: 3], Multi: [Enabled], BW: [Enabled], RBL DNSBL: [Disabled], APM: [Enabled, Score: 500, Flags: NN_LENGTH; NN_NO_LINK_NMD; NN_LEGIT_BITDEFENDER], SGN: [Enabled], URL: [Enabled], URI DNSBL: [Disabled], SQMD: [Disabled], RTDA: [Disabled], total: 0(775) X-BitDefender-Scanner: Clean, Agent: BitDefender qmail 3.1.0 on elfie.dsd.hq, sigver: 7.50791 X-Pg-Spam-Score: -1.7 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org Hello, There's a problem with expanding Bit String data types, it make right padding with 0 instead of left padding , making the bit mask almost useless. There is an workaround for that, like mask::bit(n) >> (n-length(mask)), but is much slower than directly left padding on expand. I wonder if is this intended for Big Endian processing or is just wrong coded. Have a nice day ! -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs