Re: char(0) - Mailing list pgsql-bugs

From Tom Lane
Subject Re: char(0)
Date
Msg-id 7412.1318958235@sss.pgh.pa.us
Whole thread Raw
In response to Re: char(0)  (Susanne Ebrecht <susanne@2ndQuadrant.com>)
List pgsql-bugs
Susanne Ebrecht <susanne@2ndQuadrant.com> 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

pgsql-bugs by date:

Previous
From: "Kevin Grittner"
Date:
Subject: Re: Tablespace files deleted in continuous run
Next
From: Tom Lane
Date:
Subject: Re: incompatible pointer type