Re: char(0)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Susanne Ebrecht <susanne(at)2ndQuadrant(dot)com>
Cc: Andreas Pflug <pgadmin(at)pse-consulting(dot)de>, Thomas Kellerer <spam_eater(at)gmx(dot)net>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: char(0)
Date: 2011-10-18 17:17:15
Message-ID: 7412.1318958235@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Susanne Ebrecht <susanne(at)2ndQuadrant(dot)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

In response to

  • Re: char(0) at 2011-10-18 14:38:37 from Susanne Ebrecht

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2011-10-18 18:22:20 Re: incompatible pointer type
Previous Message Kevin Grittner 2011-10-18 16:44:41 Re: Tablespace files deleted in continuous run