Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 83AE2B5DCCF for ; Tue, 18 Oct 2011 14:17:32 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 99524-04-2 for ; Tue, 18 Oct 2011 17:17:26 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0-rc2 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id B3DA3B5DC65 for ; Tue, 18 Oct 2011 14:17:21 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id p9IHHF5K007413; Tue, 18 Oct 2011 13:17:15 -0400 (EDT) To: Susanne Ebrecht cc: Andreas Pflug , Thomas Kellerer , pgsql-bugs@postgresql.org Subject: Re: char(0) In-reply-to: <4E9D8F6D.6030300@2ndQuadrant.com> References: <4E9BD9E2.2010305@2ndQuadrant.com> <4E9C3E94.3020509@pse-consulting.de> <4E9D8F6D.6030300@2ndQuadrant.com> Comments: In-reply-to Susanne Ebrecht message dated "Tue, 18 Oct 2011 16:38:37 +0200" Date: Tue, 18 Oct 2011 13:17:15 -0400 Message-ID: <7412.1318958235@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.404 tagged_above=-5 required=5 tests=BAYES_00=-1.9, RP_MATCHES_RCVD=-0.504 X-Spam-Level: X-Archive-Number: 201110/161 X-Sequence-Number: 31431 Susanne Ebrecht writes: > On 17.10.2011 16:41, Andreas Pflug wrote: >> 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. If you're expecting to move a mysql application to postgres with zero source code changes, you're living in a fantasy world anyway ... but this difference is hardly likely to be your worst problem. AFAICT the SQL standard is perfectly clear on this. *Values* of type varchar can be of zero length, but that does not mean that you can *declare* a column to be varchar(0), and that NOTE says specifically that you can't. regards, tom lane