Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 003E2B5DC0F for ; Tue, 18 Oct 2011 11:38:50 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 98693-03 for ; Tue, 18 Oct 2011 14:38:44 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0-rc2 Received: from outmail148100.authsmtp.co.uk (outmail148100.authsmtp.co.uk [62.13.148.100]) by mail.postgresql.org (Postfix) with ESMTP id 8D633B5DBCE for ; Tue, 18 Oct 2011 11:38:44 -0300 (ADT) Received: from mail-c187.authsmtp.com (mail-c187.authsmtp.com [62.13.128.33]) by punt5.authsmtp.com (8.14.2/8.14.2/Kp) with ESMTP id p9IEcgY6082519; Tue, 18 Oct 2011 15:38:42 +0100 (BST) Received: from [192.168.23.4] (212.100.42.202.fixip.bitel.net [212.100.42.202]) (authenticated bits=0) by mail.authsmtp.com (8.14.2/8.14.2) with ESMTP id p9IEcctS032401; Tue, 18 Oct 2011 15:38:38 +0100 (BST) Message-ID: <4E9D8F6D.6030300@2ndQuadrant.com> Date: Tue, 18 Oct 2011 16:38:37 +0200 From: Susanne Ebrecht User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.23) Gecko/20110922 Thunderbird/3.1.15 MIME-Version: 1.0 To: Andreas Pflug CC: Thomas Kellerer , pgsql-bugs@postgresql.org Subject: Re: char(0) References: <4E9BD9E2.2010305@2ndQuadrant.com> <4E9C3E94.3020509@pse-consulting.de> In-Reply-To: <4E9C3E94.3020509@pse-consulting.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Server-Quench: de39a735-f996-11e0-ab46-001185d377ca X-AuthReport-Spam: If SPAM / abuse - report it at: http://www.authsmtp.com/abuse X-AuthRoute: OCdxZQATClZOUR8T DCUJJHVGRTw4LxFW CBkfawBdJUwMSABN M15eIxoIcUtFFRZ+ UCIUWVRVUU1wXGl2 YwBSZUtfY0hQXgVq TkxLXFBSFhpqBB4E GR5QEhALAlYVPB1w ZkRmXnEVWEF6fAgp F01dRGoFYHo2YWkZ TUFZIgNJIVFOeAJF alF+XHZZYmIANSsu JQJhdwMbABpkHWxe QggXbQpTKbwA X-Authentic-SMTP: 61633235383639.1000:706 X-AuthFastPath: 0 (Was 255) X-AuthVirus-Status: No virus detected - but ensure you scan with your own anti-virus system. X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-5 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201110/155 X-Sequence-Number: 31425 On 17.10.2011 16:41, Andreas Pflug wrote: > Am 17.10.11 10:53, schrieb Thomas Kellerer: >> Susanne Ebrecht, 17.10.2011 09:31: >>> Hello, >>> >>> I couldn't find that somebody already mentioned it. >>> >>> PostgreSQL isn't supporting CHAR(0). >>> >>> An empty string has a length of 0. >>> >>> CHAR(0) can have two values: NULL and empty string. >>> >>> In MySQL it is very common to simulate not null boolean >>> by using CHAR(0). >>> >>> This is a little bit annoying on migration topics. >> While not move on to a cleaner approach during the migration and use a >> "boolean not null"? > Sounds much too straight forward, not mysql-ish artistic enough... Depends if you want / are able to touch the application source code or not. Susanne -- Susanne Ebrecht - 2ndQuadrant PostgreSQL Development, 24x7 Support, Training and Services www.2ndQuadrant.com